some progress
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('items_to_fetch', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('tmdb_id');
|
||||
$table->enum('type', ['movie', 'tv_series']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('item_to_fetches');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('movies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('tmdb_id')->unsigned()->nullable(false);
|
||||
$table->unsignedTinyInteger('adult')->default(0);
|
||||
$table->unsignedInteger('runtime')->default(0);
|
||||
$table->string('backdrop_path', 500)->nullable();
|
||||
$table->decimal('budget', 10, 2)->nullable();
|
||||
$table->decimal('revenue', 10, 2)->nullable();
|
||||
$table->string('homepage', 500)->nullable();
|
||||
$table->string('imdb_id', 25)->nullable();
|
||||
$table->string('status', 50)->nullable();
|
||||
$table->string('original_language', 5)->nullable();
|
||||
$table->string('original_title', 500)->nullable();
|
||||
$table->string('title', 500);
|
||||
$table->string('slug', 500)->unique();
|
||||
$table->text('overview')->nullable();
|
||||
$table->text('tagline')->nullable();
|
||||
$table->string('poster_path', 500)->nullable();
|
||||
$table->date('release_date')->nullable();
|
||||
$table->decimal('vote_average', 10, 2)->default(0);
|
||||
$table->unsignedSmallInteger('vote_count')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('movies');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('shows', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedTinyInteger('adult')->default(0);
|
||||
$table->string('backdrop_path', 500)->nullable();
|
||||
$table->unsignedInteger('episode_run_time')->default(0);
|
||||
$table->date('first_air_date')->nullable();
|
||||
$table->string('homepage', 500)->nullable();
|
||||
$table->string('tmdb_id', 50)->nullable();
|
||||
$table->unsignedTinyInteger('in_production')->default(0);
|
||||
$table->string('languages', 255)->nullable();
|
||||
$table->date('last_air_date')->nullable();
|
||||
$table->string('name', 500);
|
||||
$table->string('slug', 500)->unique();
|
||||
$table->unsignedInteger('number_of_episodes')->default(0);
|
||||
$table->unsignedInteger('number_of_seasons')->default(0);
|
||||
$table->string('origin_country', 255)->nullable();
|
||||
$table->string('original_language', 255)->nullable();
|
||||
$table->string('original_name', 255)->nullable();
|
||||
$table->text('overview')->nullable();
|
||||
$table->decimal('popularity', 10, 2)->default(0);
|
||||
$table->string('poster_path', 500)->nullable();
|
||||
$table->string('status', 255)->nullable();
|
||||
$table->string('tagline', 255)->nullable();
|
||||
$table->string('type', 255);
|
||||
$table->decimal('vote_average', 10, 2)->default(0);
|
||||
$table->unsignedInteger('vote_count')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('shows');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('item_to_fetch_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('tmdb_id')->nullable(false);
|
||||
$table->bigInteger('item_id')->nullable(true);
|
||||
$table->string('type')->nullable(false);
|
||||
$table->json('remaining_jobs')->default(null);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('item_to_fetch_jobs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('movie_collections', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('poster_path')->nullable();
|
||||
$table->string('backdrop_path')->nullable();
|
||||
$table->unsignedBigInteger('tmdb_id')->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('movie_collections');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('movies_in_collection', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('movie_id')->nullable(false);
|
||||
$table->bigInteger('collection_id')->nullable(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('movies_in_collection');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('genres', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->unsignedBigInteger('tmdb_id');
|
||||
$table->enum('type', ['movie', 'show']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('genres');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('movie_genres', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->bigInteger('movie_id');
|
||||
$table->bigInteger('genre_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('movie_genres');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user