using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class wyw2026020501 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "T_SE_TRAIN_RECORD_USER_FILE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), RECORD_USER_ID = table.Column(type: "uniqueidentifier", nullable: false), IMG_FILE_ID = table.Column(type: "uniqueidentifier", nullable: false), IS_DELETED = table.Column(type: "bit", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), 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) }, constraints: table => { table.PrimaryKey("PK_T_SE_TRAIN_RECORD_USER_FILE", x => x.ID); table.ForeignKey( name: "FK_T_SE_TRAIN_RECORD_USER_FILE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_SE_TRAIN_RECORD_USER_FILE_T_PF_IMG_FILE_IMG_FILE_ID", column: x => x.IMG_FILE_ID, principalTable: "T_PF_IMG_FILE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_SE_TRAIN_RECORD_USER_FILE_T_SE_TRAIN_RECORD_USER_RECORD_USER_ID", column: x => x.RECORD_USER_ID, principalTable: "T_SE_TRAIN_RECORD_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_T_SE_TRAIN_RECORD_USER_FILE_IMG_FILE_ID", table: "T_SE_TRAIN_RECORD_USER_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_SE_TRAIN_RECORD_USER_FILE_ORG_ID", table: "T_SE_TRAIN_RECORD_USER_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_SE_TRAIN_RECORD_USER_FILE_RECORD_USER_ID", table: "T_SE_TRAIN_RECORD_USER_FILE", column: "RECORD_USER_ID"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "T_SE_TRAIN_RECORD_USER_FILE"); } } }