Update master Varietas
This commit is contained in:
@@ -22,6 +22,20 @@ return new class extends Migration
|
|||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Schema::create('master_varietas', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->foreignId('komoditas_id')->constrained('master_komoditas')->onDelete('cascade');
|
||||||
|
$table->string('nama');
|
||||||
|
$table->text('deskripsi')->unique();
|
||||||
|
|
||||||
|
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
|
||||||
|
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
|
||||||
|
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,5 +44,6 @@ return new class extends Migration
|
|||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('master_komoditas');
|
Schema::dropIfExists('master_komoditas');
|
||||||
|
Schema::dropIfExists('master_varietas');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ return new class extends Migration
|
|||||||
$table->foreignId('adat_pemilik_id')->nullable()->constrained('adat')->onDelete('set null');
|
$table->foreignId('adat_pemilik_id')->nullable()->constrained('adat')->onDelete('set null');
|
||||||
|
|
||||||
$table->foreignId('desa_kelurahan_id')->nullable()->constrained('master_desa_kelurahan');
|
$table->foreignId('desa_kelurahan_id')->nullable()->constrained('master_desa_kelurahan');
|
||||||
$table->text('path')->nullable();
|
$table->jsonb('path')->nullable();
|
||||||
|
|
||||||
$table->float('luas_lahan', 8)->nullable();
|
$table->float('luas_lahan', 8)->nullable();
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ return new class extends Migration
|
|||||||
$table->string('nama');
|
$table->string('nama');
|
||||||
|
|
||||||
$table->foreignId('komoditas_id')->constrained('master_komoditas')->onDelete('set null');
|
$table->foreignId('komoditas_id')->constrained('master_komoditas')->onDelete('set null');
|
||||||
|
$table->foreignId('varietas_id')->constrained('master_varietas')->onDelete('set null');
|
||||||
$table->foreignId('profile_id')->constrained('profiles')->onDelete('set null');
|
$table->foreignId('profile_id')->constrained('profiles')->onDelete('set null');
|
||||||
$table->foreignId('lahan_id')->constrained('map_lahan')->onDelete('set null');
|
$table->foreignId('lahan_id')->constrained('map_lahan')->onDelete('set null');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user