<?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('schedules', function (Blueprint $table) {
            $table->id("schedule_id");
            $table->foreignId("weekday_id")->constrained(
                table: "weekdays", column: "weekday_id", indexName: "constraint_weekday_id"
            );
            $table->foreignId("game_id")->constrained(
                table: "games", column: "game_id", indexName: "constraint_game_id"
            );
            $table->text("stream_time");
        });
    }

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