using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class wyw2025112001 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_T_SE_TRAIN_NOTIFY_T_SE_TRAIN_CHECK_TYPE_ENUM_CHECK_TYPE_ID", table: "T_SE_TRAIN_NOTIFY"); migrationBuilder.DropIndex( name: "IX_T_SE_TRAIN_NOTIFY_CHECK_TYPE_ID", table: "T_SE_TRAIN_NOTIFY"); migrationBuilder.DropColumn( name: "CHECK_TYPE_ID", table: "T_SE_TRAIN_NOTIFY"); migrationBuilder.AddColumn( name: "CHECKTYPE", table: "T_SE_TRAIN_NOTIFY", type: "int", nullable: false, defaultValue: 56); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "CHECKTYPE", table: "T_SE_TRAIN_NOTIFY"); migrationBuilder.AddColumn( name: "CHECK_TYPE_ID", table: "T_SE_TRAIN_NOTIFY", type: "uniqueidentifier", nullable: true); migrationBuilder.CreateIndex( name: "IX_T_SE_TRAIN_NOTIFY_CHECK_TYPE_ID", table: "T_SE_TRAIN_NOTIFY", column: "CHECK_TYPE_ID"); migrationBuilder.AddForeignKey( name: "FK_T_SE_TRAIN_NOTIFY_T_SE_TRAIN_CHECK_TYPE_ENUM_CHECK_TYPE_ID", table: "T_SE_TRAIN_NOTIFY", column: "CHECK_TYPE_ID", principalTable: "T_SE_TRAIN_CHECK_TYPE_ENUM", principalColumn: "ID", onDelete: ReferentialAction.Restrict); } } }