<?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('action_master', function (Blueprint $table) {

    $table->bigIncrements('Act_Id');

    $table->unsignedBigInteger('Dpt_id')->nullable();

    $table->string('St_Name',25);
    $table->string('Previous_Status',25)->nullable();
    $table->string('stage',25)->nullable();

    $table->string('Viewers',25)->nullable();

    // multiple designation ids
    $table->json('Authorities')->nullable();

    $table->string('Act_Remarks',150)->nullable();

    $table->timestamps();

    $table->foreign('Dpt_id')
        ->references('Dpt_id')
        ->on('dept_master')
        ->onDelete('set null')
        ->onUpdate('cascade');
});
    }

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