<?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('riwayat_bks', function (Blueprint $table) {
            $table->increments('id_riwayat_bk');
            $table->integer('id_pengaduan_bk')->unsigned();
            $table->text('tindakan_bk');
            $table->foreign('id_pengaduan_bk')->references('id_pengaduan_bk')->on('pengaduan_bks')->onDelete('cascade')->onUpdate('cascade');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('riwayat_bks');
    }
};
