using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class wyw2025073002 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "DEPARTMENT_ID", table: "T_WB_DANGEROUS_JOB", type: "uniqueidentifier", nullable: true); migrationBuilder.CreateIndex( name: "IX_T_WB_DANGEROUS_JOB_DEPARTMENT_ID", table: "T_WB_DANGEROUS_JOB", column: "DEPARTMENT_ID"); migrationBuilder.AddForeignKey( name: "FK_T_WB_DANGEROUS_JOB_T_FM_DEPARTMENT_DEPARTMENT_ID", table: "T_WB_DANGEROUS_JOB", column: "DEPARTMENT_ID", principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_T_WB_DANGEROUS_JOB_T_FM_DEPARTMENT_DEPARTMENT_ID", table: "T_WB_DANGEROUS_JOB"); migrationBuilder.DropIndex( name: "IX_T_WB_DANGEROUS_JOB_DEPARTMENT_ID", table: "T_WB_DANGEROUS_JOB"); migrationBuilder.DropColumn( name: "DEPARTMENT_ID", table: "T_WB_DANGEROUS_JOB"); } } }