Update Kelompok Tani & APP AGERA
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
<?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('survey_kelompok_tani', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uid')->unique();
|
||||
// Data Responden
|
||||
$table->string('nama_responden')->nullable();
|
||||
$table->string('jabatan_responden')->nullable();
|
||||
$table->string('kontak_responden')->nullable();
|
||||
// Identitas Kelompok Tani
|
||||
$table->string('nama_kelompok')->nullable();
|
||||
$table->foreignId('desa_kelurahan_id')->nullable()->constrained('master_desa_kelurahan');
|
||||
$table->string('dusun')->nullable();
|
||||
$table->year('tahun_berdiri')->nullable();
|
||||
$table->string('jenis_kelompok', 50)->nullable();
|
||||
$table->string('nama_gapoktan')->nullable();
|
||||
$table->jsonb('komoditas_id')->nullable();
|
||||
// Pengurus & Anggota Kelompok
|
||||
$table->unsignedInteger('jumlah_pengurus')->nullable();
|
||||
$table->unsignedInteger('jumlah_pengurus_aktif')->nullable();
|
||||
$table->unsignedInteger('jumlah_anggota_terdaftar')->nullable();
|
||||
$table->unsignedInteger('jumlah_anggota_aktif')->nullable();
|
||||
$table->unsignedInteger('jumlah_pengurus_laki_laki')->nullable();
|
||||
$table->unsignedInteger('jumlah_pengurus_perempuan')->nullable();
|
||||
$table->unsignedInteger('jumlah_anggota_laki_laki')->nullable();
|
||||
$table->unsignedInteger('jumlah_anggota_perempuan')->nullable();
|
||||
$table->unsignedInteger('jumlah_anggota_pemuda_laki_laki')->nullable();
|
||||
$table->unsignedInteger('jumlah_anggota_pemuda_perempuan')->nullable();
|
||||
// Cakupan Wilayah Kelompok
|
||||
$table->string('cakupan_wilayah')->nullable();
|
||||
$table->text('nama_wilayah_cakupan')->nullable();
|
||||
// Status Legalitas Kelompok
|
||||
$table->string('status_legalitas', 50)->nullable();
|
||||
$table->string('nomor_sk', 100)->nullable();
|
||||
$table->string('tanggal_tahun_penerbitan_sk', 30)->nullable();
|
||||
// Kualitas Kepemimpinan
|
||||
$table->string('tingkat_keaktifan_ketua', 30)->nullable();
|
||||
$table->string('status_pembagian_peran', 30)->nullable();
|
||||
$table->string('status_dokumentasi_rapat', 30)->nullable();
|
||||
// Frekuensi Pertemuan Rutin
|
||||
$table->string('frekuensi_pertemuan', 50)->nullable();
|
||||
$table->date('tanggal_pertemuan_terakhir')->nullable();
|
||||
// Kegiatan Kongkret yang Sudah Berjalan
|
||||
$table->jsonb('kegiatan_terlaksana')->nullable();
|
||||
$table->decimal('estimasi_panen_minimal', 10, 2)->nullable();
|
||||
$table->decimal('estimasi_panen_maksimal', 10, 2)->nullable();
|
||||
$table->string('satuan_hasil_panen')->nullable();
|
||||
$table->jsonb('tindakan_hasil_panen')->nullable();
|
||||
// Peran & Fungsi Kelompok
|
||||
$table->jsonb('fungsi_kelompok_bagi_anggota')->nullable();
|
||||
// Kapasitas Pengelolaan Kas/Simpan-Pinjam Kelompok
|
||||
$table->string('pembukuan_kas', 50)->nullable();
|
||||
$table->string('pengelola_kas')->nullable();
|
||||
$table->string('masalah_pengelolaan_kas_simpan_pinjam')->nullable();
|
||||
$table->text('deskripsi_masalah_pengelolaan_kas_simpan_pinjam')->nullable();
|
||||
// Keterlibatan Perempuan
|
||||
$table->string('partisipasi_perempuan')->nullable();
|
||||
// Riwayat konflik Internal Kelompok
|
||||
$table->string('konflik_kelompok')->nullable();
|
||||
$table->string('topik_konflik')->nullable();
|
||||
$table->text('penyelesaian_konflik')->nullable();
|
||||
// Pengalaman Akses Bantuan
|
||||
$table->boolean('pernah_mendapatkan_bantuan')->nullable();
|
||||
// Postensi Sebagai Mitra Agregasi/Pengolahan Kolektif
|
||||
$table->string('potensi_kelompok')->nullable();
|
||||
$table->text('alasan_penilaian_potensi')->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();
|
||||
});
|
||||
|
||||
Schema::create('survey_pengurus_kelompok_tani', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uid')->unique();
|
||||
$table->foreignId('survey_kelompok_tani_id')->nullable()->constrained('survey_kelompok_tani')->cascadeOnUpdate()->cascadeOnDelete();
|
||||
$table->string('nama_pengurus');
|
||||
$table->string('jabatan');
|
||||
$table->string('kontak');
|
||||
$table->boolean('status');
|
||||
$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();
|
||||
});
|
||||
|
||||
Schema::create('survey_aset_kelompok_tani', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uid')->unique();
|
||||
$table->foreignId('survey_kelompok_tani_id')->nullable()->constrained('survey_kelompok_tani')->cascadeOnUpdate()->cascadeOnDelete();
|
||||
$table->string('jenis_aset');
|
||||
$table->boolean('status_aset');
|
||||
$table->string('status_pengelolaan_aset');
|
||||
$table->string('kondisi_aset');
|
||||
$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();
|
||||
});
|
||||
|
||||
Schema::create('survey_bantuan_kelompok_tani', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uid')->unique();
|
||||
$table->foreignId('survey_kelompok_tani_id')->nullable()->constrained('survey_kelompok_tani')->cascadeOnUpdate()->cascadeOnDelete();
|
||||
$table->string('nama_program');
|
||||
$table->string('penyelenggara');
|
||||
$table->string('bentuk_bantuan');
|
||||
$table->year('tahun');
|
||||
$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('survey_bantuan_kelompok_tani');
|
||||
Schema::dropIfExists('survey_aset_kelompok_tani');
|
||||
Schema::dropIfExists('survey_pengurus_kelompok_tani');
|
||||
Schema::dropIfExists('survey_kelompok_tani');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user