<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('boarding_houses', function (Blueprint $table) {
            // Membuang kolom teks 'city' yang lama agar tidak bentrok dengan fungsi relasi city()
            $table->dropColumn('city');
        });
    }

    public function down(): void
    {
        Schema::table('boarding_houses', function (Blueprint $table) {
            $table->string('city')->nullable();
        });
    }
};
