id('VerifikasiId'); $table->unsignedInteger('PelaporanId'); $table->unsignedInteger('RefPelaporanId'); $table->tinyInteger('Verif'); $table->dateTime('Tanggal'); $table->integer('Oleh'); // Membuat index $table->index('PelaporanId', 'Index_PelaporanId'); $table->index('RefPelaporanId', 'Index_RefPelaporanId'); // Menambahkan foreign key untuk relasi dengan tabel Pelaporan $table->foreign('PelaporanId') ->references('PelaporanId') ->on('Pelaporan') ->onDelete('cascade'); // Menambahkan foreign key untuk relasi dengan tabel RefPelaporan $table->foreign('RefPelaporanId') ->references('RefPelaporanId') ->on('RefPelaporan') ->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('Verifikasi', function (Blueprint $table) { $table->dropForeign(['PelaporanId']); $table->dropForeign(['RefPelaporanId']); }); Schema::dropIfExists('Verifikasi'); } };