<?php

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

return new class extends Migration
{
    /**
     * Driver/vehicle details, filled in by admin staff once a booking is
     * confirmed (paid) and dispatch assigns who's actually doing the trip.
     * Nullable — unknown until assignment happens, and never required for
     * pending_payment/cancelled/expired bookings.
     */
    public function up(): void
    {
        Schema::table('bookings', function (Blueprint $table) {
            $table->string('driver_name')->nullable();
            $table->string('driver_phone')->nullable();
            $table->string('car_plate_number')->nullable();
            $table->string('car_model')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('bookings', function (Blueprint $table) {
            $table->dropColumn(['driver_name', 'driver_phone', 'car_plate_number', 'car_model']);
        });
    }
};
