migrations
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void {
|
||||
Schema::create('facilitator', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('user_email')->unique();
|
||||
$table->string('full_name');
|
||||
$table->string('role')->nullable();
|
||||
$table->string('village')->nullable();
|
||||
$table->string('district')->nullable();
|
||||
$table->string('regency')->nullable();
|
||||
$table->string('province')->nullable();
|
||||
$table->string('phone')->nullable();
|
||||
$table->boolean('is_active')->default(true);
|
||||
|
||||
// Audit Columns
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
|
||||
$table->timestamp('created_date')->nullable(); // Sesuai konstanta CREATED_AT di model
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
Schema::dropIfExists('facilitator');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user