<?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('file_stages', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('file_id')->foreignId('files')->constrained()->onDelete('cascade');
            $table->bigInteger('stage_id')->foreignId('stages')->constrained()->onDelete('cascade');
            $table->text('comment')->nullable();
            $table->foreignId('created_by')->constrained('users')->nullable();
            $table->unsignedBigInteger('updated_by')->foreignId('users')->nullable();
            $table->boolean('active')->default(true);
            $table->timestamps();
        });
    }

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