<?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('customer_addresses', function (Blueprint $table) {
            $table->string('country')->nullable()->after('address');
            $table->string('district')->nullable()->after('country');
            $table->string('thana')->nullable()->after('district');
            $table->string('post_office')->nullable()->after('thana');
            $table->string('postal_code')->nullable()->after('post_office');
            $table->string('address_source')->nullable()->after('postal_code');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('customer_addresses', function (Blueprint $table) {
            $table->dropColumn([
                'country',
                'district',
                'thana',
                'post_office',
                'postal_code',
                'address_source',
            ]);
        });
    }
};
