<?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('matches', function (Blueprint $table) {
            $table->id('match_id');
            $table->string('home_team', 100);
            $table->string('away_team', 100);
            $table->dateTime('match_date');
            $table->string('stadium', 255);
            $table->text("home_team_flag")->nullable();
            $table->text("away_team_flag")->nullable();
            $table->string("amount", 100)->nullable();
            $table->timestamps(); // Adds both created_at and updated_at correctly
        });
    }

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