using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class wyw2026041001 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "APPROVAL_ROLE_ID", table: "T_SE_TRAIN_PLAN_DETAIL", type: "uniqueidentifier", nullable: true); migrationBuilder.CreateIndex( name: "IX_T_SE_TRAIN_PLAN_DETAIL_APPROVAL_ROLE_ID", table: "T_SE_TRAIN_PLAN_DETAIL", column: "APPROVAL_ROLE_ID"); migrationBuilder.AddForeignKey( name: "FK_T_SE_TRAIN_PLAN_DETAIL_T_PF_APPROVAL_ROLE_APPROVAL_ROLE_ID", table: "T_SE_TRAIN_PLAN_DETAIL", column: "APPROVAL_ROLE_ID", principalTable: "T_PF_APPROVAL_ROLE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_T_SE_TRAIN_PLAN_DETAIL_T_PF_APPROVAL_ROLE_APPROVAL_ROLE_ID", table: "T_SE_TRAIN_PLAN_DETAIL"); migrationBuilder.DropIndex( name: "IX_T_SE_TRAIN_PLAN_DETAIL_APPROVAL_ROLE_ID", table: "T_SE_TRAIN_PLAN_DETAIL"); migrationBuilder.DropColumn( name: "APPROVAL_ROLE_ID", table: "T_SE_TRAIN_PLAN_DETAIL"); } } }