[#1] added the credits part

This commit is contained in:
2024-12-30 02:28:58 +02:00
parent 458d09171f
commit 51a6ab6c7a
7 changed files with 272 additions and 2 deletions
@@ -0,0 +1,42 @@
<?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('people', function (Blueprint $table) {
$table->id();
$table->boolean('adult')->default(0);
$table->json('also_known_as')->nullable();
$table->integer('tmdb_id');
$table->text('biography')->nullable();
$table->date('birtday')->nullable();
$table->date('deathday')->nullable();
$table->tinyInteger('gender')->default(0);// 0 not specified,1 female, 2 male, 3 non binary
$table->string('homepage', 500)->nullable();
$table->string('imdb_id', 20)->nullable();
$table->json('known_for_department');
$table->string('name', 255);
$table->string('slug', 255);
$table->string('place_of_birth', 500)->nullable();
$table->decimal('popularity', 10, 2)->default(0);
$table->text('profile_path')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('people');
}
};
@@ -0,0 +1,33 @@
<?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_cast', function (Blueprint $table) {
$table->id();
$table->bigInteger('movie_id')->nullable(false);
$table->bigInteger('person_id')->nullable(false);
$table->string('known_for_department', 500);
$table->string('character', 500);
$table->string('tmdb_cast_id', 500);
$table->integer('order');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('movie_cast');
}
};
@@ -0,0 +1,33 @@
<?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_crew', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('movie_id')->nullable(false);
$table->unsignedBigInteger('person_id')->nullable(false);
$table->string('known_for_department', 500);
$table->string('job', 500);
$table->string('department', 500);
$table->string('tmdb_cast_id', 500);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('movie_crew');
}
};