<?php

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

return new class extends Migration
{
    /**
     * "Popular routes" is being reworked from scratch to match the
     * client's actual logic (details TBD) — the blunt is_popular flag
     * shipped in 2026_08_20_010000 didn't align with it, so it's removed
     * rather than kept around unused.
     */
    public function up(): void
    {
        Schema::table('ev_routes', function (Blueprint $table) {
            $table->dropColumn('is_popular');
        });
    }

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