update profile & produktivitas
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('produksi', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('kode_produksi')->nullable();
|
||||
$table->foreignId('profile_id')->nullable()->constrained('profiles')->onDelete('set null');
|
||||
$table->foreignId('lahan_id')->nullable()->constrained('map_lahan')->onDelete('set null');
|
||||
$table->foreignId('tanaman_id')->nullable()->constrained('map_tanaman')->onDelete('set null');
|
||||
$table->foreignId('komoditas_id')->nullable()->constrained('master_komoditas')->onDelete('set null');
|
||||
$table->string('periode')->nullable();
|
||||
$table->date('tanggal_panen')->nullable();
|
||||
$table->decimal('luas_tanam', 12, 2)->nullable();
|
||||
$table->decimal('luas_panen', 12, 2)->nullable();
|
||||
$table->decimal('jumlah_panen', 12, 2)->nullable();
|
||||
$table->string('satuan', 20)->default('kg');
|
||||
$table->decimal('produktivitas', 12, 2)->nullable();
|
||||
$table->string('status_panen')->default('belum_panen');
|
||||
$table->text('catatan')->nullable();
|
||||
$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();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('produksi');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('kualitas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('produksi_id')->nullable()->constrained('produksi')->onDelete('set null');
|
||||
$table->foreignId('profile_id')->nullable()->constrained('profiles')->onDelete('set null');
|
||||
$table->foreignId('lahan_id')->nullable()->constrained('map_lahan')->onDelete('set null');
|
||||
$table->foreignId('komoditas_id')->nullable()->constrained('master_komoditas')->onDelete('set null');
|
||||
$table->date('tanggal_pemeriksaan')->nullable();
|
||||
$table->string('grade')->nullable();
|
||||
$table->decimal('kadar_air', 8, 2)->nullable();
|
||||
$table->decimal('berat_bersih', 12, 2)->nullable();
|
||||
$table->decimal('berat_rusak', 12, 2)->nullable();
|
||||
$table->decimal('persentase_kerusakan', 8, 2)->nullable();
|
||||
$table->string('standar_mutu')->nullable();
|
||||
$table->string('status_kelayakan')->default('layak');
|
||||
$table->string('pemeriksa')->nullable();
|
||||
$table->text('catatan')->nullable();
|
||||
$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();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('kualitas');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user