Update Alert Profil Petani
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Status kelengkapan data petani (App\Enums\StatusDataPetani):
|
||||
* draft → lengkap → terverifikasi. Data lama otomatis "draft".
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('petani', function (Blueprint $table) {
|
||||
$table->string('status', 20)->default('draft')->index();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('petani', function (Blueprint $table) {
|
||||
$table->dropIndex(['status']);
|
||||
$table->dropColumn('status');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user