| Current Path : /var/www/html/LLCF-APP/database/migrations/ |
| Current File : /var/www/html/LLCF-APP/database/migrations/2025_08_03_185800_create_donor_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('donor', function (Blueprint $table) {
$table->increments('id');
$table->string('donor_name', 45);
$table->string('donor_whatsapp', 45);
$table->string('donor_ref_name', 45);
$table->string('donor_whatsapp_sec', 45)->nullable();
$table->timestamp('created_on')->useCurrent();
$table->timestamp('updated_on')->nullable()->useCurrentOnUpdate();
$table->unique('donor_name', 'donor_name_unique');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('donor');
}
};