Update Pendidikan & Pelatihan

This commit is contained in:
2026-07-12 23:00:58 +07:00
parent bcc15d5240
commit b445392e9f
2 changed files with 64 additions and 0 deletions
@@ -0,0 +1,52 @@
<?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_pelatihan', function (Blueprint $table) {
$table->id();
$table->string('uid')->unique();
$table->foreignId('petani_id')->nullable()->constrained('petani')->onDelete('set null');
$table->string('jenis_pelatihan');
$table->string('penyelenggara');
$table->integer('tahun_pelaksanaan');
$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_sertifikasi', function (Blueprint $table) {
$table->id();
$table->string('uid')->unique();
$table->foreignId('petani_id')->nullable()->constrained('petani')->onDelete('set null');
$table->string('jenis_sertifikasi');
$table->string('lembaga_penerbit');
$table->integer('tahun_pelaksanaan');
$table->boolean('is_aktif')->default(false);
$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('pelatihan');
Schema::dropIfExists('sertifikasi');
}
};