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

            $table->bigIncrements('PGM_Id');

            $table->unsignedBigInteger('PC_Id');

            $table->decimal('GPay_Amount', 10, 2);

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

            // Foreign Key
            $table->foreign('PC_Id')
                ->references('PC_Id')
                ->on('pay_comm_master')
                ->restrictOnDelete()
                ->cascadeOnUpdate();
        });
    }


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