<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('eventos', function (Blueprint $table) {
            $table->integer('fase')->default(0)->after('id_torneo')->comment('0=Regular, 1=Cuartos, 2=Semis, 3=Final');
            $table->integer('numero_partido_bracket')->nullable()->after('fase');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('eventos', function (Blueprint $table) {
            $table->dropColumn(['fase', 'numero_partido_bracket']);
        });
    }
};
