35 lines
982 B
PHP
35 lines
982 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('residence', function (Blueprint $table) {
|
|
$table->id('residence_id');
|
|
$table->foreignId('person_id')->constrained('person', 'person_id')->cascadeOnDelete();
|
|
$table->boolean('darwin')->default(false);
|
|
$table->boolean('katherine')->default(false);
|
|
$table->boolean('tennant_creek')->default(false);
|
|
$table->boolean('alice_springs')->default(false);
|
|
$table->string('home_at_death', 100)->nullable();
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('residence');
|
|
}
|
|
};
|