<?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('bookings', function (Blueprint $table) {
            $table->renameColumn('sender_name', 'receiver_name');
            $table->renameColumn('sender_phone', 'receiver_phone');
            $table->renameColumn('sender_cnic', 'receiver_cnic');
            $table->renameColumn('sender_city', 'receiver_city');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('bookings', function (Blueprint $table) {
            $table->renameColumn('receiver_name', 'sender_name');
            $table->renameColumn('receiver_phone', 'sender_phone');
            $table->renameColumn('receiver_cnic', 'sender_cnic');
            $table->renameColumn('receiver_city', 'sender_city');
        });
    }
};
