<?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('play_online_settings', function (Blueprint $table) {
            $table->unsignedBigInteger('file_id')->primary();
            $table->foreign('file_id')
                ->references('id')
                ->on('entry_files')
                ->onDelete('cascade');

            $table->string('core', 30);
            $table->boolean('threads')->default(false);
            $table->timestamps();
        });
    }

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