<?php

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

return new class extends Migration
{
    /**
     * Round trip is no longer a flag on the route — a round-trip booking now
     * explicitly supplies a `return_ev_route_id`, validated server-side as
     * the true reverse of the outbound route (`EvRoute::isReverseOf`), so
     * this flag has no remaining purpose (domain.md §2b).
     */
    public function up(): void
    {
        Schema::table('ev_routes', function (Blueprint $table) {
            $table->dropColumn('is_round_trip');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('ev_routes', function (Blueprint $table) {
            $table->boolean('is_round_trip')->default(false);
        });
    }
};
