using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class wjn2024012501 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL"); migrationBuilder.DropTable( name: "T_LR_DEMAND_LAW"); migrationBuilder.DropTable( name: "T_LR_DEMAND_OTHER"); migrationBuilder.DropTable( name: "T_LR_DEMAND_TYPE"); migrationBuilder.DropTable( name: "T_LR_DEMAND_USER"); migrationBuilder.DropTable( name: "T_LR_INTEGRATE_UPDATE_TIME"); migrationBuilder.DropTable( name: "T_LR_LAW_INSTITUTION"); migrationBuilder.DropTable( name: "T_LR_LAW_INTEGRATE_DETAIL"); migrationBuilder.DropTable( name: "T_LR_LAW_SC_SYSTEM"); migrationBuilder.DropTable( name: "T_LR_LAW_UPDATE"); migrationBuilder.DropTable( name: "T_LR_LAW_VERSION_FILE"); migrationBuilder.DropTable( name: "T_LR_LEGAL_LIST_DETAIL_FILE"); migrationBuilder.DropTable( name: "T_LR_LEGAL_LIST_DETAIL_USER"); migrationBuilder.DropTable( name: "T_LR_LRCONFIG"); migrationBuilder.DropTable( name: "T_LR_DEMAND_DISTINGUISH_REPORT"); migrationBuilder.DropTable( name: "T_LR_DEMAND_DISTINGUISH"); migrationBuilder.DropTable( name: "T_LR_LAW_INTEGRATE_UPDATE_DETAIL"); migrationBuilder.DropTable( name: "T_LR_LAW_INTEGRATE"); migrationBuilder.DropTable( name: "T_LR_LAW_VERSION"); migrationBuilder.DropTable( name: "T_LR_LEGAL_LIST_DETAIL"); migrationBuilder.DropTable( name: "T_LR_LAW_INTEGRATE_UPDATE"); migrationBuilder.DropTable( name: "T_LR_LAW"); migrationBuilder.DropTable( name: "T_LR_LEGAL_LIST"); migrationBuilder.DropTable( name: "T_LR_OTHER_DISTINGUISH"); migrationBuilder.DropTable( name: "T_LR_LAW_TYPE"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "T_LR_DEMAND_DISTINGUISH", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEPARTMENT_ID = table.Column(type: "uniqueidentifier", nullable: false), DISTINGUISH_TIME = table.Column(type: "datetime2", nullable: true), DISTINGUISH_TYPE = table.Column(type: "int", nullable: false), END_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), NAME = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), TRIGGER_TIME = table.Column(type: "datetime2", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: false), YEARS = table.Column(type: "int", nullable: false), demandTypeStr = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_LR_DEMAND_DISTINGUISH", x => x.ID); table.ForeignKey( name: "FK_T_LR_DEMAND_DISTINGUISH_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_DISTINGUISH_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_DISTINGUISH_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_DEMAND_DISTINGUISH_REPORT", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEPARTMENT_ID = table.Column(type: "uniqueidentifier", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FEEDBACK_RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), FEEDBACK_TIMES = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), INVESTIGATE_TIMES = table.Column(type: "int", nullable: false), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), REPORT_TIME = table.Column(type: "datetime2", nullable: false), YEARS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_DEMAND_DISTINGUISH_REPORT", x => x.ID); table.ForeignKey( name: "FK_T_LR_DEMAND_DISTINGUISH_REPORT_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_DISTINGUISH_REPORT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_INTEGRATE_UPDATE_TIME", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), INTEGRATE_UPDATE_TIME = table.Column(type: "datetime2", nullable: false), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_INTEGRATE_UPDATE_TIME", x => x.ID); table.ForeignKey( name: "FK_T_LR_INTEGRATE_UPDATE_TIME_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_INTEGRATE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), YEAR = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_INTEGRATE", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_INTEGRATE_UPDATE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), YEAR = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_INTEGRATE_UPDATE", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_UPDATE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_TYPE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_TYPE", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_TYPE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LEGAL_LIST", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CODE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEPARTMENT_ID = table.Column(type: "uniqueidentifier", nullable: false), DISTINGUISH_TIME = table.Column(type: "datetime2", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LEGAL_END_TIME = table.Column(type: "datetime2", nullable: true), LEGAL_STATUS = table.Column(type: "int", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: false), YEARS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LEGAL_LIST", x => x.ID); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LRCONFIG", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEMAND_END_TIME = table.Column(type: "datetime2", nullable: false), DEMAND_START_TIME = table.Column(type: "datetime2", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LRCONFIG", x => x.ID); table.ForeignKey( name: "FK_T_LR_LRCONFIG_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_OTHER_DISTINGUISH", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CODE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), NAME = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_OTHER_DISTINGUISH", x => x.ID); table.ForeignKey( name: "FK_T_LR_OTHER_DISTINGUISH_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEMAND_DEPARTMENT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), DEMAND_NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), DEMAND_PERSON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), DEMAND_TIMES = table.Column(type: "int", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), IS_OTHER = table.Column(type: "int", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), REPORT_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL_T_LR_DEMAND_DISTINGUISH_REPORT_REPORT_ID", column: x => x.REPORT_ID, principalTable: "T_LR_DEMAND_DISTINGUISH_REPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_DEMAND_TYPE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEMANDTYPE_ID = table.Column(type: "uniqueidentifier", nullable: false), DISTINGUISH_ID = table.Column(type: "uniqueidentifier", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_DEMAND_TYPE", x => x.ID); table.ForeignKey( name: "FK_T_LR_DEMAND_TYPE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_TYPE_T_LR_DEMAND_DISTINGUISH_DISTINGUISH_ID", column: x => x.DISTINGUISH_ID, principalTable: "T_LR_DEMAND_DISTINGUISH", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_TYPE_T_LR_LAW_TYPE_DEMANDTYPE_ID", column: x => x.DEMANDTYPE_ID, principalTable: "T_LR_LAW_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CODE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LAW_STATUS = table.Column(type: "int", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), NAME = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PREPARED_DEPARTMENT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: false), UPDATE_TIME = table.Column(type: "datetime2", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: false), VERSION_NUM = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_T_LR_LAW_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_LR_LAW_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_DEMAND_OTHER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DISTINGUISH_ID = table.Column(type: "uniqueidentifier", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), OTHER_ID = table.Column(type: "uniqueidentifier", nullable: false), REMARK = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_LR_DEMAND_OTHER", x => x.ID); table.ForeignKey( name: "FK_T_LR_DEMAND_OTHER_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_OTHER_T_LR_DEMAND_DISTINGUISH_DISTINGUISH_ID", column: x => x.DISTINGUISH_ID, principalTable: "T_LR_DEMAND_DISTINGUISH", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_OTHER_T_LR_OTHER_DISTINGUISH_OTHER_ID", column: x => x.OTHER_ID, principalTable: "T_LR_OTHER_DISTINGUISH", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_DEMAND_USER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), OTHER_ID = table.Column(type: "uniqueidentifier", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_DEMAND_USER", x => x.ID); table.ForeignKey( name: "FK_T_LR_DEMAND_USER_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_USER_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_USER_T_LR_OTHER_DISTINGUISH_OTHER_ID", column: x => x.OTHER_ID, principalTable: "T_LR_OTHER_DISTINGUISH", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LEGAL_LIST_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEMANDTYPE_ID = table.Column(type: "uniqueidentifier", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EXECUTE_TIME = table.Column(type: "datetime2", nullable: false), FILE_NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), FILE_STATUS = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LEGAL_ID = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), OTHER_ID = table.Column(type: "uniqueidentifier", nullable: false), UPDATE_TIME = table.Column(type: "datetime2", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), VERSION_NUM = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_LR_LEGAL_LIST_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_T_LR_LAW_TYPE_DEMANDTYPE_ID", column: x => x.DEMANDTYPE_ID, principalTable: "T_LR_LAW_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_T_LR_LEGAL_LIST_LEGAL_ID", column: x => x.LEGAL_ID, principalTable: "T_LR_LEGAL_LIST", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_T_LR_OTHER_DISTINGUISH_OTHER_ID", column: x => x.OTHER_ID, principalTable: "T_LR_OTHER_DISTINGUISH", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_DEMAND_LAW", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DISTINGUISH_ID = table.Column(type: "uniqueidentifier", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LAW_ID = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), REMARK = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_LR_DEMAND_LAW", x => x.ID); table.ForeignKey( name: "FK_T_LR_DEMAND_LAW_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_LAW_T_LR_DEMAND_DISTINGUISH_DISTINGUISH_ID", column: x => x.DISTINGUISH_ID, principalTable: "T_LR_DEMAND_DISTINGUISH", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_DEMAND_LAW_T_LR_LAW_LAW_ID", column: x => x.LAW_ID, principalTable: "T_LR_LAW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_INTEGRATE_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LAW_ID = table.Column(type: "uniqueidentifier", nullable: false), LAW_INTEGRATE_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SYSTEM_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_INTEGRATE_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_DETAIL_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_DETAIL_T_LR_LAW_INTEGRATE_LAW_INTEGRATE_ID", column: x => x.LAW_INTEGRATE_ID, principalTable: "T_LR_LAW_INTEGRATE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_DETAIL_T_LR_LAW_LAW_ID", column: x => x.LAW_ID, principalTable: "T_LR_LAW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_DETAIL_T_SC_STANDARD_CREATE_SYSTEM_ID", column: x => x.SYSTEM_ID, principalTable: "T_SC_STANDARD_CREATE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_INTEGRATE_UPDATE_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), INTEGRATE_UPDATE_ID = table.Column(type: "uniqueidentifier", nullable: false), IS_DELETED = table.Column(type: "bit", nullable: false), LAW_ID = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), UPDATE_STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_INTEGRATE_UPDATE_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_UPDATE_DETAIL_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_UPDATE_DETAIL_T_LR_LAW_INTEGRATE_UPDATE_INTEGRATE_UPDATE_ID", column: x => x.INTEGRATE_UPDATE_ID, principalTable: "T_LR_LAW_INTEGRATE_UPDATE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_INTEGRATE_UPDATE_DETAIL_T_LR_LAW_LAW_ID", column: x => x.LAW_ID, principalTable: "T_LR_LAW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_SC_SYSTEM", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LAW_ID = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SC_SYSTEM_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_SC_SYSTEM", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_SC_SYSTEM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_SC_SYSTEM_T_LR_LAW_LAW_ID", column: x => x.LAW_ID, principalTable: "T_LR_LAW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_SC_SYSTEM_T_SC_STANDARD_CREATE_SC_SYSTEM_ID", column: x => x.SC_SYSTEM_ID, principalTable: "T_SC_STANDARD_CREATE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_UPDATE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LAW_ID = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_UPDATE", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_UPDATE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_UPDATE_T_LR_LAW_LAW_ID", column: x => x.LAW_ID, principalTable: "T_LR_LAW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_VERSION", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTER_TIME = table.Column(type: "datetime2", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EXECUTE_TIME = table.Column(type: "datetime2", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LAW_ID = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), UPDATE_TIME = table.Column(type: "datetime2", nullable: false), VERSION_NUM = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), VERSION_STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_VERSION", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_VERSION_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_VERSION_T_LR_LAW_LAW_ID", column: x => x.LAW_ID, principalTable: "T_LR_LAW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LEGAL_LIST_DETAIL_FILE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IMG_FILE_ID = table.Column(type: "uniqueidentifier", nullable: false), IS_DELETED = table.Column(type: "bit", nullable: false), LEGAL_LIST_DETAIL = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LEGAL_LIST_DETAIL_FILE", x => x.ID); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_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_LR_LEGAL_LIST_DETAIL_FILE_T_LR_LEGAL_LIST_DETAIL_LEGAL_LIST_DETAIL", column: x => x.LEGAL_LIST_DETAIL, principalTable: "T_LR_LEGAL_LIST_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_FILE_T_PF_IMG_FILE_IMG_FILE_ID", column: x => x.IMG_FILE_ID, principalTable: "T_PF_IMG_FILE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LEGAL_LIST_DETAIL_USER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), LEGAL_LIST_DETAIL = table.Column(type: "uniqueidentifier", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LEGAL_LIST_DETAIL_USER", x => x.ID); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_USER_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_USER_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LEGAL_LIST_DETAIL_USER_T_LR_LEGAL_LIST_DETAIL_LEGAL_LIST_DETAIL", column: x => x.LEGAL_LIST_DETAIL, principalTable: "T_LR_LEGAL_LIST_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_INSTITUTION", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SC_SYSTEM_ID = table.Column(type: "uniqueidentifier", nullable: true), UPDATE_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), UPDATE_STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_INSTITUTION", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_INSTITUTION_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_INSTITUTION_T_LR_LAW_INTEGRATE_UPDATE_DETAIL_UPDATE_DETAIL_ID", column: x => x.UPDATE_DETAIL_ID, principalTable: "T_LR_LAW_INTEGRATE_UPDATE_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_INSTITUTION_T_SC_STANDARD_CREATE_SC_SYSTEM_ID", column: x => x.SC_SYSTEM_ID, principalTable: "T_SC_STANDARD_CREATE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_LR_LAW_VERSION_FILE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FLOW_ID = table.Column(type: "uniqueidentifier", nullable: true), FLOW_SEND_STATUS = table.Column(type: "int", nullable: false), FLOW_STATUS = table.Column(type: "int", nullable: false), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), IMG_FILE_ID = table.Column(type: "uniqueidentifier", nullable: false), IS_DELETED = table.Column(type: "bit", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), VERSION_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_LR_LAW_VERSION_FILE", x => x.ID); table.ForeignKey( name: "FK_T_LR_LAW_VERSION_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_LR_LAW_VERSION_FILE_T_LR_LAW_VERSION_VERSION_ID", column: x => x.VERSION_ID, principalTable: "T_LR_LAW_VERSION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_LR_LAW_VERSION_FILE_T_PF_IMG_FILE_IMG_FILE_ID", column: x => x.IMG_FILE_ID, principalTable: "T_PF_IMG_FILE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_DISTINGUISH_DEPARTMENT_ID", table: "T_LR_DEMAND_DISTINGUISH", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_DISTINGUISH_ORG_ID", table: "T_LR_DEMAND_DISTINGUISH", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_DISTINGUISH_USER_ID", table: "T_LR_DEMAND_DISTINGUISH", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_DISTINGUISH_REPORT_DEPARTMENT_ID", table: "T_LR_DEMAND_DISTINGUISH_REPORT", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_DISTINGUISH_REPORT_ORG_ID", table: "T_LR_DEMAND_DISTINGUISH_REPORT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL_ORG_ID", table: "T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL_REPORT_ID", table: "T_LR_DEMAND_DISTINGUISH_REPORT_DETAIL", column: "REPORT_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_LAW_DISTINGUISH_ID", table: "T_LR_DEMAND_LAW", column: "DISTINGUISH_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_LAW_LAW_ID", table: "T_LR_DEMAND_LAW", column: "LAW_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_LAW_ORG_ID", table: "T_LR_DEMAND_LAW", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_OTHER_DISTINGUISH_ID", table: "T_LR_DEMAND_OTHER", column: "DISTINGUISH_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_OTHER_ORG_ID", table: "T_LR_DEMAND_OTHER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_OTHER_OTHER_ID", table: "T_LR_DEMAND_OTHER", column: "OTHER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_TYPE_DEMANDTYPE_ID", table: "T_LR_DEMAND_TYPE", column: "DEMANDTYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_TYPE_DISTINGUISH_ID", table: "T_LR_DEMAND_TYPE", column: "DISTINGUISH_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_TYPE_ORG_ID", table: "T_LR_DEMAND_TYPE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_USER_ORG_ID", table: "T_LR_DEMAND_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_USER_OTHER_ID", table: "T_LR_DEMAND_USER", column: "OTHER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_DEMAND_USER_USER_ID", table: "T_LR_DEMAND_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_INTEGRATE_UPDATE_TIME_ORG_ID", table: "T_LR_INTEGRATE_UPDATE_TIME", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_NAME", table: "T_LR_LAW", column: "NAME", unique: true, filter: "[NAME] IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_ORG_ID", table: "T_LR_LAW", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_TYPE_ID", table: "T_LR_LAW", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_USER_ID", table: "T_LR_LAW", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INSTITUTION_ORG_ID", table: "T_LR_LAW_INSTITUTION", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INSTITUTION_SC_SYSTEM_ID", table: "T_LR_LAW_INSTITUTION", column: "SC_SYSTEM_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INSTITUTION_UPDATE_DETAIL_ID", table: "T_LR_LAW_INSTITUTION", column: "UPDATE_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_ORG_ID", table: "T_LR_LAW_INTEGRATE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_DETAIL_LAW_ID", table: "T_LR_LAW_INTEGRATE_DETAIL", column: "LAW_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_DETAIL_LAW_INTEGRATE_ID", table: "T_LR_LAW_INTEGRATE_DETAIL", column: "LAW_INTEGRATE_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_DETAIL_ORG_ID", table: "T_LR_LAW_INTEGRATE_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_DETAIL_SYSTEM_ID", table: "T_LR_LAW_INTEGRATE_DETAIL", column: "SYSTEM_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_UPDATE_ORG_ID", table: "T_LR_LAW_INTEGRATE_UPDATE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_UPDATE_DETAIL_INTEGRATE_UPDATE_ID", table: "T_LR_LAW_INTEGRATE_UPDATE_DETAIL", column: "INTEGRATE_UPDATE_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_UPDATE_DETAIL_LAW_ID", table: "T_LR_LAW_INTEGRATE_UPDATE_DETAIL", column: "LAW_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_INTEGRATE_UPDATE_DETAIL_ORG_ID", table: "T_LR_LAW_INTEGRATE_UPDATE_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_SC_SYSTEM_LAW_ID", table: "T_LR_LAW_SC_SYSTEM", column: "LAW_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_SC_SYSTEM_ORG_ID", table: "T_LR_LAW_SC_SYSTEM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_SC_SYSTEM_SC_SYSTEM_ID", table: "T_LR_LAW_SC_SYSTEM", column: "SC_SYSTEM_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_TYPE_NAME", table: "T_LR_LAW_TYPE", column: "NAME", unique: true, filter: "[NAME] IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_TYPE_ORG_ID", table: "T_LR_LAW_TYPE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_UPDATE_LAW_ID", table: "T_LR_LAW_UPDATE", column: "LAW_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_UPDATE_ORG_ID", table: "T_LR_LAW_UPDATE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_VERSION_LAW_ID", table: "T_LR_LAW_VERSION", column: "LAW_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_VERSION_ORG_ID", table: "T_LR_LAW_VERSION", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_VERSION_FILE_IMG_FILE_ID", table: "T_LR_LAW_VERSION_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_VERSION_FILE_ORG_ID", table: "T_LR_LAW_VERSION_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LAW_VERSION_FILE_VERSION_ID", table: "T_LR_LAW_VERSION_FILE", column: "VERSION_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DEPARTMENT_ID", table: "T_LR_LEGAL_LIST", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_ORG_ID", table: "T_LR_LEGAL_LIST", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_USER_ID", table: "T_LR_LEGAL_LIST", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_DEMANDTYPE_ID", table: "T_LR_LEGAL_LIST_DETAIL", column: "DEMANDTYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_LEGAL_ID", table: "T_LR_LEGAL_LIST_DETAIL", column: "LEGAL_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_ORG_ID", table: "T_LR_LEGAL_LIST_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_OTHER_ID", table: "T_LR_LEGAL_LIST_DETAIL", column: "OTHER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_USER_ID", table: "T_LR_LEGAL_LIST_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_FILE_IMG_FILE_ID", table: "T_LR_LEGAL_LIST_DETAIL_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_FILE_LEGAL_LIST_DETAIL", table: "T_LR_LEGAL_LIST_DETAIL_FILE", column: "LEGAL_LIST_DETAIL"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_FILE_ORG_ID", table: "T_LR_LEGAL_LIST_DETAIL_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_USER_LEGAL_LIST_DETAIL", table: "T_LR_LEGAL_LIST_DETAIL_USER", column: "LEGAL_LIST_DETAIL"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_USER_ORG_ID", table: "T_LR_LEGAL_LIST_DETAIL_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LEGAL_LIST_DETAIL_USER_USER_ID", table: "T_LR_LEGAL_LIST_DETAIL_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_LRCONFIG_ORG_ID", table: "T_LR_LRCONFIG", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_LR_OTHER_DISTINGUISH_ORG_ID", table: "T_LR_OTHER_DISTINGUISH", column: "ORG_ID"); } } }