Files
usher-manage-stack/database/migrations/2025_01_01_000000_create_members_table.php
2025-11-20 23:21:05 +08:00

36 lines
1013 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('members', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
$table->string('full_name');
$table->string('email')->index();
$table->string('phone')->nullable();
$table->string('national_id_encrypted')->nullable();
$table->string('national_id_hash')->nullable()->index();
$table->date('membership_started_at')->nullable();
$table->date('membership_expires_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('members');
}
};