<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * Soft deletes only — a booking is never hard-removed. Admin staff may
     * delete a cancelled/expired booking (BookingResource, gated by
     * manage_bookings + BookingPolicy::delete), but the row stays
     * recoverable and its Payment/Refund history stays intact.
     */
    public function up(): void
    {
        Schema::table('bookings', function (Blueprint $table) {
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('bookings', function (Blueprint $table) {
            $table->dropSoftDeletes();
        });
    }
};
