<?php

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

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('sms_country_routes', function (Blueprint $table) {
            $table->id();
            $table->char('country_code', 2);
            $table->string('provider', 50);
            $table->integer('priority')->default(0);
            $table->boolean('is_active')->default(true);
            $table->timestamps();

            $table->unique(['country_code', 'provider']);
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('sms_country_routes');
    }
};
