33 lines
815 B
PHP
33 lines
815 B
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->bigInteger("code")->unique()->nullable();
|
|
$table->string("name", 50)->nullable();
|
|
$table->date("birthdate")->nullable();
|
|
$table->enum("gender", ['male', 'female'])->nullable();
|
|
$table->json("nationality")->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('people');
|
|
}
|
|
};
|