<?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::create('matches', function (Blueprint $table) {
            $table->id();
            $table->string('match_id')->unique();
            $table->string('home_team');
            $table->string('away_team');
            $table->string('home_badge')->nullable();
            $table->string('away_badge')->nullable();
            $table->bigInteger('date')->nullable(); // Storing timestamp in ms
            $table->json('sources')->nullable();
            $table->string('category')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('matches');
    }
};
