Merge branch 'staging' into feature/senior-officer
This commit is contained in:
@@ -20,10 +20,7 @@ return new class () extends Migration {
|
|||||||
$table->datetime('tanggal_kunjungan');
|
$table->datetime('tanggal_kunjungan');
|
||||||
$table->text('keterangan')->nullable();
|
$table->text('keterangan')->nullable();
|
||||||
$table->string('status')->nullable();
|
$table->string('status')->nullable();
|
||||||
$table->string('nomor_registrasi')->references('nomor_registrasi')->on(Permohonan::class)->nullable();
|
$table->unsignedBigInteger('user_id');
|
||||||
$table->integer('penilaian_id')->nullable();
|
|
||||||
$table->integer('surveyor_id')->nullable();
|
|
||||||
$table->integer('penilai_surveyor_id')->nullable();
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->char('authorized_status', 1)->nullable();
|
$table->char('authorized_status', 1)->nullable();
|
||||||
$table->timestamp('authorized_at')->nullable();
|
$table->timestamp('authorized_at')->nullable();
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Modules\Lpj\Models\Permohonan;
|
||||||
|
|
||||||
return new class extends Migration
|
return new class extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -12,10 +13,11 @@ return new class extends Migration
|
|||||||
public function up(): void
|
public function up(): void
|
||||||
{
|
{
|
||||||
Schema::table('penilaian', function (Blueprint $table) {
|
Schema::table('penilaian', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('user_id');
|
||||||
$table->string('nomor_registrasi')->references('nomor_registrasi')->on(Permohonan::class)->onDelete('cascade');
|
$table->string('nomor_registrasi')->references('nomor_registrasi')->on(Permohonan::class)->onDelete('cascade');
|
||||||
$table->integer('penilai_id')->unsigned()->nullable();
|
$table->unsignedBigInteger('penilaian_id')->unsigned()->nullable();
|
||||||
$table->integer('surveyor_id')->unsigned()->nullable();
|
$table->unsignedBigInteger('surveyor_id')->unsigned()->nullable();
|
||||||
$table->integer('penilai_surveyor_id')->unsigned()->nullable();
|
$table->unsignedBigInteger('penilai_surveyor_id')->unsigned()->nullable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,12 +27,9 @@ return new class extends Migration
|
|||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::table('penilaian', function (Blueprint $table) {
|
Schema::table('penilaian', function (Blueprint $table) {
|
||||||
$table->dropForeign(['nomor_registrasi']);
|
$table->unsignedBigInteger('user_id')->unsigned();
|
||||||
$table->dropForeign(['penilai_id']);
|
|
||||||
$table->dropForeign(['surveyor_id']);
|
|
||||||
$table->dropForeign(['penilai_surveyor_id']);
|
|
||||||
$table->dropColumn('nomor_registrasi');
|
$table->dropColumn('nomor_registrasi');
|
||||||
$table->dropColumn('penilai_id');
|
$table->dropColumn('penilaian_id');
|
||||||
$table->dropColumn('surveyor_id');
|
$table->dropColumn('surveyor_id');
|
||||||
$table->dropColumn('penilai_surveyor_id');
|
$table->dropColumn('penilai_surveyor_id');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user