43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<?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');
|
||
|
|
}
|
||
|
|
};
|