<?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::table('tournament_matches', function (Blueprint $table) {
            // golden_goal = tiebreaker match (first goal wins)
            $table->boolean('is_golden_goal')->default(false)->after('status');
            // draw = 1 point each in group stage (winner_id stays null)
            $table->boolean('is_draw')->default(false)->after('is_golden_goal');
        });
    }

    public function down(): void
    {
        Schema::table('tournament_matches', function (Blueprint $table) {
            $table->dropColumn(['is_golden_goal', 'is_draw']);
        });
    }
};
