<?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('dataset_table44a', function (Blueprint $table) {
            $table->id('DatasetTable44AId');
            $table->integer('dataset_id');
            $table->string('kecamatan')->nullable();
            $table->string('lokasi')->nullable();
            $table->string('jenis_bencana')->nullable();
            $table->string('jumlah_area_terdampak')->nullable();
            $table->string('jumlah_korban_mengungsi')->nullable();
            $table->string('jumlah_korban_meninggal')->nullable();
            $table->string('perkiraan_kerugian')->nullable();
            $table->integer('created_by');
            $table->timestampsTz();
            $table->softdeletesTz();

            $table->foreign('dataset_id')->references('DatasetId')->on('dataset')->cascadeOnDelete();
        });
    }

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