<?php

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

return new class extends Migration
{
    /**
     * Staff-curated flag for surfacing a route as "popular" on the customer
     * side — filterable via the routes index endpoint's `popular` param.
     */
    public function up(): void
    {
        Schema::table('ev_routes', function (Blueprint $table) {
            $table->boolean('is_popular')->default(false)->after('is_active');
        });
    }

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