migrants-nt-sec/database/migrations/2024_05_15_000002_create_mi...

34 lines
926 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('migration', function (Blueprint $table) {
$table->id('migration_id');
$table->foreignId('person_id')->constrained('person', 'person_id')->cascadeOnDelete();
$table->date('date_of_arrival_aus')->nullable();
$table->date('date_of_arrival_nt')->nullable();
$table->string('arrival_period', 50)->nullable();
$table->string('data_source', 100)->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('migration');
}
};