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

36 lines
1.0 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('internment', function (Blueprint $table) {
$table->id('internment_id');
$table->foreignId('person_id')->constrained('person', 'person_id')->cascadeOnDelete();
$table->string('corps_issued', 100)->nullable();
$table->string('interned_in', 100)->nullable();
$table->string('sent_to', 100)->nullable();
$table->string('internee_occupation', 100)->nullable();
$table->text('internee_address')->nullable();
$table->string('cav', 50)->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('internment');
}
};