<?php

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

return new class extends Migration
{

    public function up(): void
    {
        Schema::create('grant_department_mapping', function (Blueprint $table) {
    $table->bigIncrements('GDM_Id');
    $table->unsignedBigInteger('Dept_Id');
    $table->json('GT_Id')->nullable(); // multiple IDs
    $table->tinyInteger('Status')->default(1);
    $table->timestamps();
    $table->softDeletes();

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

    public function down(): void
    {
        Schema::dropIfExists('grant_department_mapping');
    }
};
