using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace APT.Data.Migrations.Migrations
{
    public partial class hmr2026042201 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "FIRE_JOB_ID",
                table: "T_FO_TECH_DISCLOSURE_FROM",
                type: "uniqueidentifier",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_T_FO_TECH_DISCLOSURE_FROM_FIRE_JOB_ID",
                table: "T_FO_TECH_DISCLOSURE_FROM",
                column: "FIRE_JOB_ID");

            migrationBuilder.AddForeignKey(
                name: "FK_T_FO_TECH_DISCLOSURE_FROM_T_FO_FIRE_JOB_FIRE_JOB_ID",
                table: "T_FO_TECH_DISCLOSURE_FROM",
                column: "FIRE_JOB_ID",
                principalTable: "T_FO_FIRE_JOB",
                principalColumn: "ID",
                onDelete: ReferentialAction.Restrict);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_T_FO_TECH_DISCLOSURE_FROM_T_FO_FIRE_JOB_FIRE_JOB_ID",
                table: "T_FO_TECH_DISCLOSURE_FROM");

            migrationBuilder.DropIndex(
                name: "IX_T_FO_TECH_DISCLOSURE_FROM_FIRE_JOB_ID",
                table: "T_FO_TECH_DISCLOSURE_FROM");

            migrationBuilder.DropColumn(
                name: "FIRE_JOB_ID",
                table: "T_FO_TECH_DISCLOSURE_FROM");
        }
    }
}
