<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

/**
 * Class CreateTerminyUdalostMoznostiUdalostiTable
 */
return new class extends Migration {
    private const TABLE_NAME = 'terminy_udalost_moznosti_udalosti';

    public function up(): void
    {
        Schema::create(self::TABLE_NAME, function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('vytvoril_id');

            $table->string('nazov', 255);
            $table->string('kod')->nullable();
            $table->string('stav');

            $table->timestamps();
            $table->softDeletes();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists(self::TABLE_NAME);
    }
};
