id('Stb_Id'); $table->unsignedInteger('PelaporanId'); $table->enum('EmisiStb', ['Iya', 'Tidak'])->default('Iya'); $table->integer('Cerobong')->nullable(); $table->string('SuratPernyataan', 255)->nullable(); $table->dateTime('TanggalUnggah')->nullable(); $table->tinyInteger('Verifikasi')->nullable(); $table->dateTime('TanggalVerifikasi')->nullable(); $table->string('Keterangan', 255)->nullable(); $table->unsignedInteger('Verifikator')->nullable(); $table->index('PelaporanId', 'IndexSTB_PelaporanId'); $table->foreign('PelaporanId') ->references('PelaporanId') ->on('Pelaporan') ->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('Stb', function (Blueprint $table) { $table->dropForeign(['PelaporanId']); }); Schema::dropIfExists('Stb'); } };