Your IP : 216.73.216.91


Current Path : /var/www/html/LLCF-APP/database/migrations/
Upload File :
Current File : //var/www/html/LLCF-APP/database/migrations/2025_08_03_190121_create_family_table.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('family', function (Blueprint $table) {
            $table->increments('id');
            $table->string('father_cnic', 15);
            $table->string('father_name', 45);
            $table->string('father_phone', 45);
            $table->string('father_occup', 45);
            $table->string('address', 45);
            $table->string('religion', 12)->nullable();
            $table->integer('children_count');
            $table->string('mother_name', 45);
            $table->string('mother_cnic', 15)->nullable();
            $table->string('mother_occup', 45)->nullable();
            $table->string('zakat', 3)->nullable();
            $table->string('emerg_name', 45);
            $table->string('emerg_relation', 45);
            $table->string('emerg_num', 45);
            $table->timestamp('created_on')->useCurrent();
            $table->timestamp('updated_on')->nullable()->useCurrentOnUpdate();

            $table->unique('father_cnic', 'father_cnic_unique');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('family');
    }
};