Update workshop
This commit is contained in:
@@ -15,7 +15,7 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->string('kode', 2)->unique();
|
||||
$table->string('nama', 100);
|
||||
$table->string('path', 10000);
|
||||
$table->jsonb('path')->nullable();
|
||||
$table->string('iso', 100);
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
@@ -28,7 +28,7 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->string('kode', 4)->unique();
|
||||
$table->string('nama', 100);
|
||||
$table->string('path', 10000);
|
||||
$table->jsonb('path')->nullable();
|
||||
$table->foreignId('provinsi_id')->constrained('master_provinsi')->onDelete('set null');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
@@ -41,7 +41,7 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->string('kode', 6)->unique();
|
||||
$table->string('nama', 100);
|
||||
$table->string('path', 10000);
|
||||
$table->jsonb('path')->nullable();
|
||||
$table->foreignId('kabupaten_kota_id')->constrained('master_kabupaten_kota')->onDelete('set null');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
@@ -54,7 +54,7 @@ return new class extends Migration
|
||||
$table->id();
|
||||
$table->string('kode', 10)->unique();
|
||||
$table->string('nama', 100);
|
||||
$table->string('path', 10000);
|
||||
$table->jsonb('path')->nullable();
|
||||
$table->foreignId('kecamatan_id')->constrained('master_kecamatan')->onDelete('set null');
|
||||
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<?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('workshop', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('program_aktivitas_id')->nullable()->constrained('program_aktivitas')->nullOnDelete();
|
||||
$table->string('judul');
|
||||
$table->text('deskripsi')->nullable();
|
||||
$table->string('jenis')->nullable();
|
||||
$table->date('tanggal_awal')->nullable();
|
||||
$table->date('tanggal_akhir')->nullable();
|
||||
$table->string('status')->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('sesi_workshop', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('workshop_id')->nullable()->constrained('workshop')->nullOnDelete();
|
||||
$table->string('judul');
|
||||
$table->text('deskripsi')->nullable();
|
||||
$table->foreignId('desa_kelurahan_id')->nullable()->constrained('master_desa_kelurahan');
|
||||
$table->string('lokasi')->nullable();
|
||||
$table->timestamp('tanggal_awal')->nullable();
|
||||
$table->timestamp('tanggal_akhir')->nullable();
|
||||
$table->string('status')->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('peserta_workshop', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('sesi_workshop_id')->nullable()->constrained('sesi_workshop')->nullOnDelete();
|
||||
$table->foreignId('profile_id')->nullable()->constrained('profiles')->nullOnDelete();
|
||||
$table->string('status')->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('peserta_workshop');
|
||||
Schema::dropIfExists('sesi_workshop');
|
||||
Schema::dropIfExists('workshop');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user