<?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::table('penempatans', function (Blueprint $table) {
            $table->after('nama', function (Blueprint $table) {
                $table->integer('kawasan_id');
                $table->integer('taman_id')->nullable();
                $table->integer('jalan_id')->nullable();
            });
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        //
        Schema::table('penempatans', function (Blueprint $table) {
            $table->dropColumn('kawasan_id');
            $table->dropColumn('taman_id');
            $table->dropColumn('jalan_id');
        });
    }
};
