data ekosistem petani

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-28 15:02:53 +07:00
co-authored by Copilot
parent f9c8009600
commit 3fd63e844c
12 changed files with 1406 additions and 0 deletions
@@ -0,0 +1,58 @@
<?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('ekosistem_petani_cpm', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->boolean('jenis_kelamin');
$table->date('tanggal_lahir');
$table->string('pendidikan_terakhir')->nullable();
$table->string('alamat')->nullable();
$table->foreignId('desa_kelurahan_id')->nullable()->constrained('master_desa_kelurahan');
$table->string('pekerjaan_utama')->nullable();
$table->foreignId('komoditas_id')->nullable()->constrained('master_komoditas');
$table->float('lama_bertani', 8)->nullable();
$table->float('luas_lahan', 8)->nullable();
$table->string('pekerjaan_sampingan')->nullable();
$table->foreignId('komoditas_sampingan_id')->nullable()->constrained('master_komoditas');
$table->float('lama_bertani_sampingan', 8)->nullable();
$table->float('luas_lahan_sampingan', 8)->nullable();
$table->string('status_perkawinan')->nullable();
$table->string('status_keluarga')->nullable();
$table->integer('jumlah_tanggungan')->nullable();
$table->jsonb('petani_pengumpul')->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();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('ekosistem_petani_cpm');
}
};