36 lines
1013 B
PHP
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');
|
|
}
|
|
};
|
|
|