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