Merge branch 'staging' into feature/senior-officer

This commit is contained in:
majid
2024-09-27 11:18:36 +07:00
15 changed files with 417 additions and 75 deletions

View File

@@ -0,0 +1,38 @@
<?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::table('penilaian', function (Blueprint $table) {
$table->string('nomor_registrasi')->references('nomor_registrasi')->on(Permohonan::class)->onDelete('cascade');
$table->integer('penilai_id')->unsigned()->nullable();
$table->integer('surveyor_id')->unsigned()->nullable();
$table->integer('penilai_surveyor_id')->unsigned()->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('penilaian', function (Blueprint $table) {
$table->dropForeign(['nomor_registrasi']);
$table->dropForeign(['penilai_id']);
$table->dropForeign(['surveyor_id']);
$table->dropForeign(['penilai_surveyor_id']);
$table->dropColumn('nomor_registrasi');
$table->dropColumn('penilai_id');
$table->dropColumn('surveyor_id');
$table->dropColumn('penilai_surveyor_id');
});
}
};