using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class wyw2026012101 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "EXAMETYPE", table: "T_SE_TRAIN_NOTIFY", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID", table: "T_PF_PARAM", type: "uniqueidentifier", nullable: true); //migrationBuilder.CreateTable( // name: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", // columns: table => new // { // ID = table.Column(type: "uniqueidentifier", nullable: false), // NOTIFY_ID = table.Column(type: "uniqueidentifier", nullable: false), // //Nav_NotifyID = table.Column(type: "uniqueidentifier", nullable: true), // COURSEWEARLIBRARY_ID = table.Column(type: "uniqueidentifier", nullable: false), // //Nav_CourID = table.Column(type: "uniqueidentifier", nullable: true), // NUM = table.Column(type: "int", nullable: false), // IS_DELETED = table.Column(type: "bit", nullable: false), // ORG_ID = table.Column(type: "uniqueidentifier", nullable: true), // ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), // FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), // FLOW_STATUS = table.Column(type: "int", nullable: false), // FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), // FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), // CREATE_TIME = table.Column(type: "datetime2", nullable: true), // MODIFY_TIME = table.Column(type: "datetime2", nullable: true), // CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), // MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), // DbConn = table.Column(type: "nvarchar(max)", nullable: true), // //Nav_OrgID = table.Column(type: "uniqueidentifier", nullable: true), // TaskID = table.Column(type: "uniqueidentifier", nullable: false) // }, // constraints: table => // { // table.PrimaryKey("PK_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", x => x.ID); // //table.ForeignKey( // // name: "FK_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_T_FM_ORGANIZATION_Nav_OrgID", // // column: x => x.Nav_OrgID, // // principalTable: "T_FM_ORGANIZATION", // // principalColumn: "ID", // // onDelete: ReferentialAction.Restrict); // table.ForeignKey( // name: "FK_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_T_SE_COURSEWEARLIBRARY_COURSEWEARLIBRARY_ID", // column: x => x.COURSEWEARLIBRARY_ID, // principalTable: "T_SE_COURSEWEARLIBRARY", // principalColumn: "ID", // onDelete: ReferentialAction.Restrict); // table.ForeignKey( // name: "FK_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_T_SE_TRAIN_NOTIFY_NOTIFY_ID", // column: x => x.NOTIFY_ID, // principalTable: "T_SE_TRAIN_NOTIFY", // principalColumn: "ID", // onDelete: ReferentialAction.Restrict); // }); //migrationBuilder.CreateIndex( // name: "IX_T_PF_PARAM_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID", // table: "T_PF_PARAM", // column: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID"); //migrationBuilder.CreateIndex( // name: "IX_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_COURSEWEARLIBRARY_ID", // table: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", // column: "COURSEWEARLIBRARY_ID"); //migrationBuilder.CreateIndex( // name: "IX_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_NOTIFY_ID", // table: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", // column: "NOTIFY_ID"); ////migrationBuilder.CreateIndex( //// name: "IX_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_Nav_OrgID", //// table: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", //// column: "Nav_OrgID"); //migrationBuilder.AddForeignKey( // name: "FK_T_PF_PARAM_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID", // table: "T_PF_PARAM", // column: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID", // principalTable: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY", // principalColumn: "ID", // onDelete: ReferentialAction.Restrict); } protected override void Down(MigrationBuilder migrationBuilder) { //migrationBuilder.DropForeignKey( // name: "FK_T_PF_PARAM_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID", // table: "T_PF_PARAM"); //migrationBuilder.DropTable( // name: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARY"); //migrationBuilder.DropIndex( // name: "IX_T_PF_PARAM_T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID", // table: "T_PF_PARAM"); migrationBuilder.DropColumn( name: "EXAMETYPE", table: "T_SE_TRAIN_NOTIFY"); //migrationBuilder.DropColumn( // name: "T_SE_TRAIN_NOTIFY_COURSEWEARLIBRARYID", // table: "T_PF_PARAM"); } } }