using System; using Microsoft.EntityFrameworkCore.Migrations; namespace APT.Data.Migrations.Migrations { public partial class hmr2024020101 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "T_PE_ASSESSMENT_ITEM"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_PLAN_METHOD"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_PLAN_USER"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_RECORD_METHOD"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_RECORD_USER"); migrationBuilder.DropTable( name: "T_PE_SAFETY_MONITOR_PLAN_DETAIL"); migrationBuilder.DropTable( name: "T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE"); migrationBuilder.DropTable( name: "T_PE_SAFETY_MONITOR_RECORD_USER"); migrationBuilder.DropTable( name: "T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL"); migrationBuilder.DropTable( name: "T_PE_STANDARDIZED_SCORE_IMPORT_ITEM"); migrationBuilder.DropTable( name: "T_PR_CHANGE_ACCEPTANCE"); migrationBuilder.DropTable( name: "T_PR_CHANGE_IDENTIFY_EVALUATION_TASK"); migrationBuilder.DropTable( name: "T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE"); migrationBuilder.DropTable( name: "T_PR_CHANGE_TASK_IMPLEMENT_FILE"); migrationBuilder.DropTable( name: "T_PR_CHANGE_TASK_IMPLEMENT_USER"); migrationBuilder.DropTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_AIR"); migrationBuilder.DropTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_DEAL"); migrationBuilder.DropTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_DRUG"); migrationBuilder.DropTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_SERI"); migrationBuilder.DropTable( name: "T_PR_DEPARTMENT_STEP_LINK"); migrationBuilder.DropTable( name: "T_PR_DESIGN_DOCUMENT_REVIEW_FILE"); migrationBuilder.DropTable( name: "T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT"); migrationBuilder.DropTable( name: "T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT"); migrationBuilder.DropTable( name: "T_PR_DRUG_CARRY_RECORD_DETAIL_USER"); migrationBuilder.DropTable( name: "T_PR_DRUG_CARRY_SAFE_CONFIRM"); migrationBuilder.DropTable( name: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT"); migrationBuilder.DropTable( name: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER"); migrationBuilder.DropTable( name: "T_PR_DRUG_SET_SAFE_CONFIRM"); migrationBuilder.DropTable( name: "T_PR_DRUG_TYPE_SAFE_CONFIRM"); migrationBuilder.DropTable( name: "T_PR_DRUG_USE_RECORD_CONFIRM"); migrationBuilder.DropTable( name: "T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM"); migrationBuilder.DropTable( name: "T_PR_DRUG_USE_RECORD_PRINT"); migrationBuilder.DropTable( name: "T_PR_DRUG_USE_RECORD_USER"); migrationBuilder.DropTable( name: "T_PR_DUTY_OPERATION_RECORD_DEAL"); migrationBuilder.DropTable( name: "T_PR_DUTY_OPERATION_RECORD_DRUG"); migrationBuilder.DropTable( name: "T_PR_DUTY_OPERATION_RECORD_INVE"); migrationBuilder.DropTable( name: "T_PR_DUTY_OPERATION_RECORD_MACH"); migrationBuilder.DropTable( name: "T_PR_DUTY_OPERATION_RECORD_TUNG"); migrationBuilder.DropTable( name: "T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE"); migrationBuilder.DropTable( name: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE"); migrationBuilder.DropTable( name: "T_PR_LABORATORY_OPERATION_RECORD_DET"); migrationBuilder.DropTable( name: "T_PR_LABORATORY_OPERATION_RECORD_ORE"); migrationBuilder.DropTable( name: "T_PR_LABORATORY_OPERATION_RECORD_PRE"); migrationBuilder.DropTable( name: "T_PR_LABORATORY_OPERATION_RECORD_SAM"); migrationBuilder.DropTable( name: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE"); migrationBuilder.DropTable( name: "T_PR_MAP_PROCESS_RECORD_FILE"); migrationBuilder.DropTable( name: "T_PR_POST_FORM_LINK_CODE"); migrationBuilder.DropTable( name: "T_PR_POST_FORM_LINK_DEPARTMENT"); migrationBuilder.DropTable( name: "T_PR_POST_FORM_LINK_XK_PARAM"); migrationBuilder.DropTable( name: "T_PR_PROCESS_FORM_XK_DETAIL"); migrationBuilder.DropTable( name: "T_PR_PRODUCTION_OPERATION_RECORD_FILE"); migrationBuilder.DropTable( name: "T_PR_PRODUCTION_OPERATION_RECORD_USER"); migrationBuilder.DropTable( name: "T_PR_SANDPUMP_OPERATION_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_SURVEY_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_SURVEY_RECORD_FILE"); migrationBuilder.DropTable( name: "T_PR_SURVEY_RECORD_SET"); migrationBuilder.DropTable( name: "T_PR_SURVEY_RECORD_USER"); migrationBuilder.DropTable( name: "T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_DRUG"); migrationBuilder.DropTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_MEAS"); migrationBuilder.DropTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_SERI"); migrationBuilder.DropTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_TARG"); migrationBuilder.DropTable( name: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT"); migrationBuilder.DropTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT"); migrationBuilder.DropTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_FILE"); migrationBuilder.DropTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT"); migrationBuilder.DropTable( name: "T_PT_FILE_TYPE"); migrationBuilder.DropTable( name: "T_PT_GOALS_AND_TARGET"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_FILE"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_PLAN_FILE"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_REQUIREMENTS"); migrationBuilder.DropTable( name: "T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT"); migrationBuilder.DropTable( name: "T_PT_MONITOR_ASSESSMENT_USER"); migrationBuilder.DropTable( name: "T_PT_SAFETY_POLICY_SURVEY_COLLECT"); migrationBuilder.DropTable( name: "T_PT_SAFETY_POLICY_SURVEY_FEEDBACK"); migrationBuilder.DropTable( name: "T_PT_SAFETY_POLICY_SURVEY_RANGE"); migrationBuilder.DropTable( name: "T_PE_MEASURE_CONSIDER"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL"); migrationBuilder.DropTable( name: "T_PE_EVALUATION_METHOD"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PE_SAFETY_MONITOR_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_CHANGE_TYPE"); migrationBuilder.DropTable( name: "T_PR_CHANGE_TASK_IMPLEMENT"); migrationBuilder.DropTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PR_AUDIT_REQUIREMENT"); migrationBuilder.DropTable( name: "T_PR_DESIGN_DOCUMENT_REVIEW"); migrationBuilder.DropTable( name: "T_PR_DRUG_CARRY_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_DRUG_USE_RECORD_DETAIL"); migrationBuilder.DropTable( name: "T_PR_DUTY_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PR_EXPERIMENTAL_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PR_EXTERNAL_ACCEPTANCE_RECORD"); migrationBuilder.DropTable( name: "T_PR_LABORATORY_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PR_MAP_PROCESS_RECORD"); migrationBuilder.DropTable( name: "T_PR_POST_FORM_LINK"); migrationBuilder.DropTable( name: "T_PR_POST_FORM_LINK_XK"); migrationBuilder.DropTable( name: "T_PR_PROCESS_FORM_XK"); migrationBuilder.DropTable( name: "T_PR_PRODUCTION_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PR_SANDPUMP_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PR_SURVEY_RECORD"); migrationBuilder.DropTable( name: "T_PR_THOUSANDPUMP_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PR_TUNGPRE_OPERATION_RECORD"); migrationBuilder.DropTable( name: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL"); migrationBuilder.DropTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL"); migrationBuilder.DropTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM"); migrationBuilder.DropTable( name: "T_PT_PLAN_RESOURCES"); migrationBuilder.DropTable( name: "T_PT_FORMULATE_REQUIREMENTS"); migrationBuilder.DropTable( name: "T_PT_MONITOR_ASSESSMENT_DETAIL"); migrationBuilder.DropTable( name: "T_PT_COLLECT_REQUIREMENTS"); migrationBuilder.DropTable( name: "T_PT_SAFETY_POLICY_SURVEY"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_RECORD"); migrationBuilder.DropTable( name: "T_PE_MONITOR_PROJECT"); migrationBuilder.DropTable( name: "T_PE_SAFETY_MONITOR_RECORD"); migrationBuilder.DropTable( name: "T_PR_CHANGE_IDENTIFY_EVALUATION"); migrationBuilder.DropTable( name: "T_PR_PERFORM_TASK_SET"); migrationBuilder.DropTable( name: "T_PR_DRUG_PLACE"); migrationBuilder.DropTable( name: "T_PR_DRUG_USE_RECORD"); migrationBuilder.DropTable( name: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION"); migrationBuilder.DropTable( name: "T_PT_ANNUAL_MONOTOR_SUMMARY"); migrationBuilder.DropTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT"); migrationBuilder.DropTable( name: "T_PT_MONITOR_ASSESSMENT"); migrationBuilder.DropTable( name: "T_PT_INTENTIONAL_GUIDELINES"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_PLAN_DETAIL"); migrationBuilder.DropTable( name: "T_PE_SAFETY_MONITOR_PLAN"); migrationBuilder.DropTable( name: "T_PR_DRUG_CARRY_RECORD"); migrationBuilder.DropTable( name: "T_PR_DRUG_SET_SPECIFY"); migrationBuilder.DropTable( name: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR"); migrationBuilder.DropTable( name: "T_PT_INDICATOR_FORMULATION"); migrationBuilder.DropTable( name: "T_PE_CORRECTIVE_PREVENTIVE"); migrationBuilder.DropTable( name: "T_PE_SAFETY_EVALUATION_PLAN"); migrationBuilder.DropTable( name: "T_PR_DRUG_OUTBOUND_RECORD"); migrationBuilder.DropTable( name: "T_PR_DRUG_SET"); migrationBuilder.DropTable( name: "T_PE_STANDARDIZED_SCORE_IMPORT"); migrationBuilder.DropTable( name: "T_PR_DRUG_TYPE"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "T_PE_ASSESSMENT_ITEM", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PE_ASSESSMENT_ITEM", x => x.ID); table.ForeignKey( name: "FK_T_PE_ASSESSMENT_ITEM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_EVALUATION_METHOD", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PE_EVALUATION_METHOD", x => x.ID); table.ForeignKey( name: "FK_T_PE_EVALUATION_METHOD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_MEASURE_CONSIDER", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PE_MEASURE_CONSIDER", x => x.ID); table.ForeignKey( name: "FK_T_PE_MEASURE_CONSIDER_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_MONITOR_PROJECT", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PE_MONITOR_PROJECT", x => x.ID); table.ForeignKey( name: "FK_T_PE_MONITOR_PROJECT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_STANDARDIZED_SCORE_IMPORT", 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), IS_LEAF = 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), NUM = table.Column(type: "int", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PARENT_ID = table.Column(type: "uniqueidentifier", nullable: true), SCORE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TEXT = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_STANDARDIZED_SCORE_IMPORT", x => x.ID); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_T_PE_STANDARDIZED_SCORE_IMPORT_PARENT_ID", column: x => x.PARENT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_AUDIT_REQUIREMENT", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_AUDIT_REQUIREMENT", x => x.ID); table.ForeignKey( name: "FK_T_PR_AUDIT_REQUIREMENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_IDENTIFY_EVALUATION", 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: true), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, 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), RISK = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CHANGE_IDENTIFY_EVALUATION", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_TYPE", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_CHANGE_TYPE", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_TYPE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD", 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), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_CONTROLROOM_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DEPARTMENT_STEP_LINK", 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: 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), OPERATION_STEP_ID = table.Column(type: "uniqueidentifier", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DEPARTMENT_STEP_LINK", x => x.ID); table.ForeignKey( name: "FK_T_PR_DEPARTMENT_STEP_LINK_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DEPARTMENT_STEP_LINK_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DEPARTMENT_STEP_LINK_T_HM_OPERATION_STEP_OPERATION_STEP_ID", column: x => x.OPERATION_STEP_ID, principalTable: "T_HM_OPERATION_STEP", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DESIGN_DOCUMENT_REVIEW", 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: true), DESIGN_LEVEL = table.Column(type: "int", 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), POTENTIAL_RISK = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DESIGN_DOCUMENT_REVIEW", x => x.ID); table.ForeignKey( name: "FK_T_PR_DESIGN_DOCUMENT_REVIEW_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DESIGN_DOCUMENT_REVIEW_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DESIGN_DOCUMENT_REVIEW_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_OUTBOUND_RECORD", 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: 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), REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_OUTBOUND_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_PLACE", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_PLACE", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_PLACE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_TYPE", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_TYPE", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_TYPE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DUTY_OPERATION_RECORD", 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), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DUTY_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_EXPERIMENTAL_OPERATION_RECORD", 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), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PURPOSE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), REQUIREMENTS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SAMPLE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_EXPERIMENTAL_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_EXPERIMENTAL_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_LABORATORY_OPERATION_RECORD", 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), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_LABORATORY_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CHECK_TYPE = table.Column(type: "int", nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, 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_DEAL = table.Column(type: "int", nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), IS_HELP = table.Column(type: "int", nullable: true), IS_RELIABLE = table.Column(type: "int", nullable: true), MEASURES = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), MONITOR_STATUS = table.Column(type: "int", nullable: true), OPINION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PLACE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_LANDSLIDE_ROLLSTONE_MONITOR", x => x.ID); table.ForeignKey( name: "FK_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_MAP_PROCESS_RECORD", 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: true), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, 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), IS_RUN = 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), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_MAP_PROCESS_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_MAP_PROCESS_RECORD_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_MAP_PROCESS_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_MAP_PROCESS_RECORD_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_PERFORM_TASK_SET", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_PERFORM_TASK_SET", x => x.ID); table.ForeignKey( name: "FK_T_PR_PERFORM_TASK_SET_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_POST_FORM_LINK", 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), POST_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_POST_FORM_LINK", x => x.ID); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_T_FM_USER_POST_POST_ID", column: x => x.POST_ID, principalTable: "T_FM_USER_POST", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_POST_FORM_LINK_XK", 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: 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), OPERATION_STEP_ID = table.Column(type: "uniqueidentifier", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), POST_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_POST_FORM_LINK_XK", x => x.ID); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_XK_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_XK_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_XK_T_FM_USER_POST_POST_ID", column: x => x.POST_ID, principalTable: "T_FM_USER_POST", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_XK_T_HM_OPERATION_STEP_OPERATION_STEP_ID", column: x => x.OPERATION_STEP_ID, principalTable: "T_HM_OPERATION_STEP", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_PROCESS_FORM_XK", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CLASS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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: 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), OPERATION_STEP_ID = table.Column(type: "uniqueidentifier", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), POST_ID = table.Column(type: "uniqueidentifier", nullable: true), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_PROCESS_FORM_XK", x => x.ID); table.ForeignKey( name: "FK_T_PR_PROCESS_FORM_XK_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_PROCESS_FORM_XK_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_PROCESS_FORM_XK_T_FM_USER_POST_POST_ID", column: x => x.POST_ID, principalTable: "T_FM_USER_POST", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_PROCESS_FORM_XK_T_HM_OPERATION_STEP_OPERATION_STEP_ID", column: x => x.OPERATION_STEP_ID, principalTable: "T_HM_OPERATION_STEP", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_PRODUCTION_OPERATION_RECORD", 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), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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), OPERATION_STEP_ID = table.Column(type: "uniqueidentifier", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PLACE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_PRODUCTION_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_PRODUCTION_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_PRODUCTION_OPERATION_RECORD_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_PRODUCTION_OPERATION_RECORD_T_HM_OPERATION_STEP_OPERATION_STEP_ID", column: x => x.OPERATION_STEP_ID, principalTable: "T_HM_OPERATION_STEP", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_SANDPUMP_OPERATION_RECORD", 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), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_SANDPUMP_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_SANDPUMP_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_SURVEY_RECORD", 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), PLACE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_SURVEY_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_SURVEY_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_SURVEY_RECORD_SET", 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), PARAMETER = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TYPE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), VALUE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_SURVEY_RECORD_SET", x => x.ID); table.ForeignKey( name: "FK_T_PR_SURVEY_RECORD_SET_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_THOUSANDPUMP_OPERATION_RECORD", 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), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_THOUSANDPUMP_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_THOUSANDPUMP_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_TUNGPRE_OPERATION_RECORD", 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), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_TUNGPRE_OPERATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ANNUAL_MONOTOR_SUMMARY", 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), SET_TIME = table.Column(type: "datetime2", nullable: true), STATUS = table.Column(type: "int", nullable: false), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ANNUAL_MONOTOR_SUMMARY", x => x.ID); table.ForeignKey( name: "FK_T_PT_ANNUAL_MONOTOR_SUMMARY_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ASSESSMENT_CYCLE = table.Column(type: "int", nullable: false), CHARGE_NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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: 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), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_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_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_COLLECT_REQUIREMENTS", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_COLLECT_REQUIREMENTS", x => x.ID); table.ForeignKey( name: "FK_T_PT_COLLECT_REQUIREMENTS_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_FILE_TYPE", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_FILE_TYPE", x => x.ID); table.ForeignKey( name: "FK_T_PT_FILE_TYPE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_FORMULATE_REQUIREMENTS", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_FORMULATE_REQUIREMENTS", x => x.ID); table.ForeignKey( name: "FK_T_PT_FORMULATE_REQUIREMENTS_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION", 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: 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), IS_DEMAND = table.Column(type: "bit", nullable: false), IS_PLAN = table.Column(type: "bit", nullable: false), IS_TARGET = 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), PROFILE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SET_TIME = table.Column(type: "datetime2", nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), VERSION = table.Column(type: "decimal(18,2)", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INTENTIONAL_GUIDELINES", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_INTENTIONAL_GUIDELINES", x => x.ID); table.ForeignKey( name: "FK_T_PT_INTENTIONAL_GUIDELINES_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_MONITOR_ASSESSMENT", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ASSESSMENT_CYCLE = table.Column(type: "int", 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: true), DEPARTMENT_TYPE = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SET_TIME = table.Column(type: "datetime2", nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_MONITOR_ASSESSMENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_PLAN_RESOURCES", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_PLAN_RESOURCES", x => x.ID); table.ForeignKey( name: "FK_T_PT_PLAN_RESOURCES_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE", 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: 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), PRODUCTION_UNIT_ID = table.Column(type: "uniqueidentifier", nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_T_PE_STANDARDIZED_SCORE_IMPORT_PRODUCTION_UNIT_ID", column: x => x.PRODUCTION_UNIT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_EVALUATION_PLAN", 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: true), 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), IS_RUN = 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), PRODUCTION_UNIT_ID = table.Column(type: "uniqueidentifier", nullable: true), START_TIME = table.Column(type: "datetime2", nullable: true), STATUS = table.Column(type: "int", nullable: false), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_PLAN", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_T_PE_STANDARDIZED_SCORE_IMPORT_PRODUCTION_UNIT_ID", column: x => x.PRODUCTION_UNIT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_MONITOR_PLAN", 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: 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), IS_RUN = table.Column(type: "int", nullable: false), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), MONITOR_PROGRAM = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), MONITOR_RANGE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PRODUCTION_UNIT_ID = table.Column(type: "uniqueidentifier", nullable: true), RESOURCES = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_MONITOR_PLAN", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_PLAN_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_PLAN_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_PLAN_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_PLAN_T_PE_STANDARDIZED_SCORE_IMPORT_PRODUCTION_UNIT_ID", column: x => x.PRODUCTION_UNIT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONTENTS = 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), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EVALUATION_ITEM = table.Column(type: "int", nullable: true), 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), GROUP_NO = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NON_STANDARDIZED_SCORE = table.Column(type: "decimal(18,2)", nullable: true), NUM = table.Column(type: "int", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PRIMARY_ELEMENTS_ID = table.Column(type: "uniqueidentifier", nullable: true), PRODUCTION_UNIT_ID = table.Column(type: "uniqueidentifier", nullable: true), SECOND_ELEMENTS_ID = table.Column(type: "uniqueidentifier", nullable: true), STANDARDIZED_SCORE = table.Column(type: "decimal(18,2)", nullable: true), THREE_ELEMENTS_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_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_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_PRIMARY_ELEMENTS_ID", column: x => x.PRIMARY_ELEMENTS_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_PRODUCTION_UNIT_ID", column: x => x.PRODUCTION_UNIT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_SECOND_ELEMENTS_ID", column: x => x.SECOND_ELEMENTS_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_THREE_ELEMENTS_ID", column: x => x.THREE_ELEMENTS_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_STANDARDIZED_SCORE_IMPORT_ITEM", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONTENTS = 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), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EVALUATION_ITEM = table.Column(type: "int", nullable: true), 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), GROUP_NO = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NON_STANDARDIZED_SCORE = table.Column(type: "decimal(18,2)", nullable: true), NUM = table.Column(type: "int", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), STANDARDIZED_SCORE = table.Column(type: "decimal(18,2)", nullable: true), STANDARDIZED_SCORE_IMPORT_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_STANDARDIZED_SCORE_IMPORT_ITEM", x => x.ID); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_ITEM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_STANDARDIZED_SCORE_IMPORT_ITEM_T_PE_STANDARDIZED_SCORE_IMPORT_STANDARDIZED_SCORE_IMPORT_ID", column: x => x.STANDARDIZED_SCORE_IMPORT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_ACCEPTANCE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CHANGE_IDENTIFY_EVALUATION_ID = table.Column(type: "uniqueidentifier", 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: 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), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CHANGE_ACCEPTANCE", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_ACCEPTANCE_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_ACCEPTANCE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_ACCEPTANCE_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_ACCEPTANCE_T_PR_CHANGE_IDENTIFY_EVALUATION_CHANGE_IDENTIFY_EVALUATION_ID", column: x => x.CHANGE_IDENTIFY_EVALUATION_ID, principalTable: "T_PR_CHANGE_IDENTIFY_EVALUATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CHANGE_IDENTIFY_EVALUATION_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), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_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_PR_CHANGE_IDENTIFY_EVALUATION_TYPE_T_PR_CHANGE_IDENTIFY_EVALUATION_CHANGE_IDENTIFY_EVALUATION_ID", column: x => x.CHANGE_IDENTIFY_EVALUATION_ID, principalTable: "T_PR_CHANGE_IDENTIFY_EVALUATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE_T_PR_CHANGE_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_CHANGE_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_AIR", 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PRESS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TIME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CONTROLROOM_OPERATION_RECORD_AIR", x => x.ID); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_AIR_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_AIR_T_PR_CONTROLROOM_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_CONTROLROOM_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_DEAL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COUNT = 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), HOUR = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_CONTROLROOM_OPERATION_RECORD_DEAL", x => x.ID); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_DEAL_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_DEAL_T_PR_CONTROLROOM_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_CONTROLROOM_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_DRUG", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ACERAGE = 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), QTY = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CONTROLROOM_OPERATION_RECORD_DRUG", x => x.ID); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_DRUG_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_DRUG_T_PR_CONTROLROOM_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_CONTROLROOM_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CONTROLROOM_OPERATION_RECORD_SERI", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), BUBBLE_ROUGH = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), BUBBLE_SCAVENG1 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), BUBBLE_SCAVENG2 = 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), INHI_START = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), INHI_TRAFFIC = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SAPO_SCAVENG = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SAPO_START = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SAPO_TRAFFIC = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SODA_START = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SODA_TRAFFIC = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TIME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CONTROLROOM_OPERATION_RECORD_SERI", x => x.ID); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_SERI_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CONTROLROOM_OPERATION_RECORD_SERI_T_PR_CONTROLROOM_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_CONTROLROOM_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DESIGN_DOCUMENT_REVIEW_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), DESIGN_DOCUMENT_REVIEW_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), IMG_FILE_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_PR_DESIGN_DOCUMENT_REVIEW_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PR_DESIGN_DOCUMENT_REVIEW_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_PR_DESIGN_DOCUMENT_REVIEW_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_PR_DESIGN_DOCUMENT_REVIEW_FILE_T_PR_DESIGN_DOCUMENT_REVIEW_DESIGN_DOCUMENT_REVIEW_ID", column: x => x.DESIGN_DOCUMENT_REVIEW_ID, principalTable: "T_PR_DESIGN_DOCUMENT_REVIEW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT", 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), DESIGN_DOCUMENT_REVIEW_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), REQUIREMENT_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT", x => x.ID); table.ForeignKey( name: "FK_T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT_T_PR_AUDIT_REQUIREMENT_REQUIREMENT_ID", column: x => x.REQUIREMENT_ID, principalTable: "T_PR_AUDIT_REQUIREMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT_T_PR_DESIGN_DOCUMENT_REVIEW_DESIGN_DOCUMENT_REVIEW_ID", column: x => x.DESIGN_DOCUMENT_REVIEW_ID, principalTable: "T_PR_DESIGN_DOCUMENT_REVIEW", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_CARRY_RECORD", 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), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), OUTBOUND_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), STATUS = table.Column(type: "int", nullable: false), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_CARRY_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_T_PR_DRUG_OUTBOUND_RECORD_OUTBOUND_RECORD_ID", column: x => x.OUTBOUND_RECORD_ID, principalTable: "T_PR_DRUG_OUTBOUND_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_SET", 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), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_SET", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_SET_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_SET_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_TYPE_SAFE_CONFIRM", 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(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_TYPE_SAFE_CONFIRM", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_TYPE_SAFE_CONFIRM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_TYPE_SAFE_CONFIRM_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DUTY_OPERATION_RECORD_DEAL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COUNT = 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), HOUR = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DUTY_OPERATION_RECORD_DEAL", x => x.ID); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_DEAL_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_DEAL_T_PR_DUTY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_DUTY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DUTY_OPERATION_RECORD_DRUG", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ACERAGE = 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), QTY = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DUTY_OPERATION_RECORD_DRUG", x => x.ID); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_DRUG_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_DRUG_T_PR_DUTY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_DUTY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DUTY_OPERATION_RECORD_INVE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ACCEPT_QTY = 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), HEIGHT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), INPUT_QTY = table.Column(type: "nvarchar(500)", maxLength: 500, 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SEND_QTY = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), USE_QTY = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DUTY_OPERATION_RECORD_INVE", x => x.ID); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_INVE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_INVE_T_PR_DUTY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_DUTY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DUTY_OPERATION_RECORD_MACH", 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), HEAT_QTY = table.Column(type: "nvarchar(500)", maxLength: 500, 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PRESS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), QTY = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DUTY_OPERATION_RECORD_MACH", x => x.ID); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_MACH_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_MACH_T_PR_DUTY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_DUTY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DUTY_OPERATION_RECORD_TUNG", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COARSE_FINE = 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), ENRICHMENT = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RECOVERY_RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), REMARK = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TAILING = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), UNDRESS_ORE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DUTY_OPERATION_RECORD_TUNG", x => x.ID); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_TUNG_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DUTY_OPERATION_RECORD_TUNG_T_PR_DUTY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_DUTY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL", 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), GRADE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), IS_DELETED = table.Column(type: "bit", nullable: false), METAL = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), WEIGHT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_EXPERIMENTAL_OPERATION_RECORD_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_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL_T_PR_EXPERIMENTAL_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_EXPERIMENTAL_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_LABORATORY_OPERATION_RECORD_DET", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COARSE_FINE = 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), ENRICHMENT = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RECOVERY_RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TAILING = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), UNDRESS_ORE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_LABORATORY_OPERATION_RECORD_DET", x => x.ID); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_DET_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_DET_T_PR_LABORATORY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_LABORATORY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_LABORATORY_OPERATION_RECORD_ORE", 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), FINENESS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PH = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STRINGNESS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_LABORATORY_OPERATION_RECORD_ORE", x => x.ID); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_ORE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_ORE_T_PR_LABORATORY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_LABORATORY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_LABORATORY_OPERATION_RECORD_PRE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COARSE_FINE = 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), ENRICHMENT = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RECOVERY_RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TAILING = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), UNDRESS_ORE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_LABORATORY_OPERATION_RECORD_PRE", x => x.ID); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_PRE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_PRE_T_PR_LABORATORY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_LABORATORY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_LABORATORY_OPERATION_RECORD_SAM", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), BATCH_NO = 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), H2O = table.Column(type: "nvarchar(500)", maxLength: 500, 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), WO3 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_LABORATORY_OPERATION_RECORD_SAM", x => x.ID); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_SAM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_LABORATORY_OPERATION_RECORD_SAM_T_PR_LABORATORY_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_LABORATORY_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION", 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: true), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EXTERNAL_COMPANY_ID = table.Column(type: "uniqueidentifier", nullable: true), 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), MONITOR_ID = table.Column(type: "uniqueidentifier", nullable: true), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PHONE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_EXTERNAL_ASSISTANCE_APPLICATION", x => x.ID); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_T_OG_EXTERNAL_CONTACT_DETAIL_EXTERNAL_COMPANY_ID", column: x => x.EXTERNAL_COMPANY_ID, principalTable: "T_OG_EXTERNAL_CONTACT_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_MONITOR_ID", column: x => x.MONITOR_ID, principalTable: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR_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: true), IS_DELETED = table.Column(type: "bit", nullable: false), LANDSLIDE_ROLLSTONE_MONITOR_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_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_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_PR_LANDSLIDE_ROLLSTONE_MONITOR_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_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_LANDSLIDE_ROLLSTONE_MONITOR_ID", column: x => x.LANDSLIDE_ROLLSTONE_MONITOR_ID, principalTable: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_MAP_PROCESS_RECORD_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: true), IS_DELETED = table.Column(type: "bit", nullable: false), MAP_PROCESS_RECORD_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_PR_MAP_PROCESS_RECORD_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PR_MAP_PROCESS_RECORD_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_PR_MAP_PROCESS_RECORD_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_PR_MAP_PROCESS_RECORD_FILE_T_PR_MAP_PROCESS_RECORD_MAP_PROCESS_RECORD_ID", column: x => x.MAP_PROCESS_RECORD_ID, principalTable: "T_PR_MAP_PROCESS_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ACCEPTANCE_OPINION = table.Column(type: "int", nullable: true), CHANGE_IDENTIFY_EVALUATION_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), NOTHROUGH_REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), TASK_ID = table.Column(type: "uniqueidentifier", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_T_PR_CHANGE_IDENTIFY_EVALUATION_CHANGE_IDENTIFY_EVALUATION_ID", column: x => x.CHANGE_IDENTIFY_EVALUATION_ID, principalTable: "T_PR_CHANGE_IDENTIFY_EVALUATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_T_PR_PERFORM_TASK_SET_TASK_ID", column: x => x.TASK_ID, principalTable: "T_PR_PERFORM_TASK_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_TASK_IMPLEMENT", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CHANGE_IDENTIFY_EVALUATION_ID = table.Column(type: "uniqueidentifier", 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: 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), NOTHROUGH_REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PERFORM_DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), PERFORM_STATUS = table.Column(type: "int", nullable: true), REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STATUS = table.Column(type: "int", nullable: false), TASK_ID = table.Column(type: "uniqueidentifier", nullable: true), TIME = table.Column(type: "datetime2", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CHANGE_TASK_IMPLEMENT", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_TASK_IMPLEMENT_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_TASK_IMPLEMENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_TASK_IMPLEMENT_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_TASK_IMPLEMENT_T_PR_CHANGE_IDENTIFY_EVALUATION_CHANGE_IDENTIFY_EVALUATION_ID", column: x => x.CHANGE_IDENTIFY_EVALUATION_ID, principalTable: "T_PR_CHANGE_IDENTIFY_EVALUATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_CHANGE_TASK_IMPLEMENT_T_PR_PERFORM_TASK_SET_TASK_ID", column: x => x.TASK_ID, principalTable: "T_PR_PERFORM_TASK_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_POST_FORM_LINK_CODE", 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), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PF_FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), POST_POST_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_POST_FORM_LINK_CODE", x => x.ID); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_CODE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_CODE_T_PF_FORM_PF_FORM_ID", column: x => x.PF_FORM_ID, principalTable: "T_PF_FORM", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_CODE_T_PR_POST_FORM_LINK_POST_POST_ID", column: x => x.POST_POST_ID, principalTable: "T_PR_POST_FORM_LINK", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_POST_FORM_LINK_DEPARTMENT", 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: 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), POST_POST_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_POST_FORM_LINK_DEPARTMENT", x => x.ID); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_DEPARTMENT_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_DEPARTMENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_DEPARTMENT_T_PR_POST_FORM_LINK_POST_POST_ID", column: x => x.POST_POST_ID, principalTable: "T_PR_POST_FORM_LINK", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_POST_FORM_LINK_XK_PARAM", 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), NUM = table.Column(type: "int", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PARAM = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), POST_POST_ID = table.Column(type: "uniqueidentifier", nullable: false), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_POST_FORM_LINK_XK_PARAM", x => x.ID); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_XK_PARAM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_POST_FORM_LINK_XK_PARAM_T_PR_POST_FORM_LINK_XK_POST_POST_ID", column: x => x.POST_POST_ID, principalTable: "T_PR_POST_FORM_LINK_XK", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_PROCESS_FORM_XK_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), 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), NUM = table.Column(type: "int", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PARAM = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), POST_PROCESS_FORM_ID = table.Column(type: "uniqueidentifier", nullable: false), RECORD_TIME = table.Column(type: "datetime2", nullable: true), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), VALUE = table.Column(type: "int", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_PROCESS_FORM_XK_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_PROCESS_FORM_XK_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_PR_PROCESS_FORM_XK_DETAIL_T_PR_PROCESS_FORM_XK_POST_PROCESS_FORM_ID", column: x => x.POST_PROCESS_FORM_ID, principalTable: "T_PR_PROCESS_FORM_XK", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_PRODUCTION_OPERATION_RECORD_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: 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), PRODUCTION_OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_PRODUCTION_OPERATION_RECORD_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PR_PRODUCTION_OPERATION_RECORD_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_PR_PRODUCTION_OPERATION_RECORD_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_PR_PRODUCTION_OPERATION_RECORD_FILE_T_PR_PRODUCTION_OPERATION_RECORD_PRODUCTION_OPERATION_RECORD_ID", column: x => x.PRODUCTION_OPERATION_RECORD_ID, principalTable: "T_PR_PRODUCTION_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_PRODUCTION_OPERATION_RECORD_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), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PRODUCTION_OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_PRODUCTION_OPERATION_RECORD_USER", x => x.ID); table.ForeignKey( name: "FK_T_PR_PRODUCTION_OPERATION_RECORD_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_PR_PRODUCTION_OPERATION_RECORD_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_PR_PRODUCTION_OPERATION_RECORD_USER_T_PR_PRODUCTION_OPERATION_RECORD_PRODUCTION_OPERATION_RECORD_ID", column: x => x.PRODUCTION_OPERATION_RECORD_ID, principalTable: "T_PR_PRODUCTION_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_SANDPUMP_OPERATION_RECORD_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), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_SANDPUMP_OPERATION_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_SANDPUMP_OPERATION_RECORD_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_PR_SANDPUMP_OPERATION_RECORD_DETAIL_T_PR_SANDPUMP_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_SANDPUMP_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_SURVEY_RECORD_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ACTUAL_VALUE = 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), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PARAMETER = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SURVEY_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), TYPE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), VALUE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_SURVEY_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_SURVEY_RECORD_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_PR_SURVEY_RECORD_DETAIL_T_PR_SURVEY_RECORD_SURVEY_RECORD_ID", column: x => x.SURVEY_RECORD_ID, principalTable: "T_PR_SURVEY_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_SURVEY_RECORD_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: 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), SURVEY_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_SURVEY_RECORD_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PR_SURVEY_RECORD_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_PR_SURVEY_RECORD_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_PR_SURVEY_RECORD_FILE_T_PR_SURVEY_RECORD_SURVEY_RECORD_ID", column: x => x.SURVEY_RECORD_ID, principalTable: "T_PR_SURVEY_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_SURVEY_RECORD_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), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false), SURVEY_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_SURVEY_RECORD_USER", x => x.ID); table.ForeignKey( name: "FK_T_PR_SURVEY_RECORD_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_PR_SURVEY_RECORD_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_PR_SURVEY_RECORD_USER_T_PR_SURVEY_RECORD_SURVEY_RECORD_ID", column: x => x.SURVEY_RECORD_ID, principalTable: "T_PR_SURVEY_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_THOUSANDPUMP_OPERATION_RECORD_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), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_THOUSANDPUMP_OPERATION_RECORD_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_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL_T_PR_THOUSANDPUMP_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_THOUSANDPUMP_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_DRUG", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ACERAGE = 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), QTY = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_TUNGPRE_OPERATION_RECORD_DRUG", x => x.ID); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_DRUG_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_DRUG_T_PR_TUNGPRE_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_TUNGPRE_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_MEAS", 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), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), TEMP = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TIME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_TUNGPRE_OPERATION_RECORD_MEAS", x => x.ID); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_MEAS_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_MEAS_T_PR_TUNGPRE_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_TUNGPRE_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_SERI", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), AIRPRESS_ROUGH = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), AIRPRESS_SCAVENG1 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), AIRPRESS_SCAVENG2 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), BUBBLE_ROUGH = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), BUBBLE_SCAVENG1 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), BUBBLE_SCAVENG2 = 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), DETAIL = table.Column(type: "nvarchar(500)", maxLength: 500, 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), INHI_START = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), INHI_TRAFFIC = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PUMP_ROUGH = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), PUMP_SCAVENG1 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), PUMP_SCAVENG2 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SAPO_SCAVENG = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SAPO_START = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SAPO_TRAFFIC = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SODA_START = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SODA_TRAFFIC = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), STRONG = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TIME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_TUNGPRE_OPERATION_RECORD_SERI", x => x.ID); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_SERI_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_SERI_T_PR_TUNGPRE_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_TUNGPRE_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_TUNGPRE_OPERATION_RECORD_TARG", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COARSE_FINE = 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), ENRICHMENT = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NO = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), OPERATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RECOVERY_RATE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), REMARK = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), TAILING = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), UNDRESS_ORE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_TUNGPRE_OPERATION_RECORD_TARG", x => x.ID); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_TARG_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_TUNGPRE_OPERATION_RECORD_TARG_T_PR_TUNGPRE_OPERATION_RECORD_OPERATION_RECORD_ID", column: x => x.OPERATION_RECORD_ID, principalTable: "T_PR_TUNGPRE_OPERATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ANNUAL_MONOTOR_SUMMARY_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), DEPARTMENT_ID = table.Column(type: "uniqueidentifier", nullable: true), DEPARTMENT_TYPE = table.Column(type: "int", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), FIRST_SCORE = table.Column(type: "decimal(18,2)", nullable: true), 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), FOURTH_SCORE = table.Column(type: "decimal(18,2)", 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), MONITOR_SUMMARY_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SECOND_SCORE = table.Column(type: "decimal(18,2)", nullable: true), THIRD_SCORE = table.Column(type: "decimal(18,2)", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR_SCORE = table.Column(type: "decimal(18,2)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ANNUAL_MONOTOR_SUMMARY_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_PT_ANNUAL_MONOTOR_SUMMARY_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_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_T_PT_ANNUAL_MONOTOR_SUMMARY_MONITOR_SUMMARY_ID", column: x => x.MONITOR_SUMMARY_ID, principalTable: "T_PT_ANNUAL_MONOTOR_SUMMARY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT", 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), METHOD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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), PLAN_AUDIT_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false), SCORE = table.Column(type: "decimal(18,2)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_PLAN_AUDIT_DETAIL_ID", column: x => x.PLAN_AUDIT_DETAIL_ID, principalTable: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT", 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: true), DEPARTMENT_TYPE = 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), INDICATOR_FORMULATION_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), SET_TIME = table.Column(type: "datetime2", nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ASSESSMENT_PLAN_AUDIT", x => x.ID); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_T_PT_INDICATOR_FORMULATION_INDICATOR_FORMULATION_ID", column: x => x.INDICATOR_FORMULATION_ID, principalTable: "T_PT_INDICATOR_FORMULATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_GOALS_AND_TARGET", 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), INDICATOR_FORMULATION_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), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_GOALS_AND_TARGET", x => x.ID); table.ForeignKey( name: "FK_T_PT_GOALS_AND_TARGET_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_GOALS_AND_TARGET_T_PT_INDICATOR_FORMULATION_INDICATOR_FORMULATION_ID", column: x => x.INDICATOR_FORMULATION_ID, principalTable: "T_PT_INDICATOR_FORMULATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", 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: true), DEPARTMENT_TYPE = 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), INDICATOR_FORMULATION_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), SET_TIME = table.Column(type: "datetime2", nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_DEPARTMENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_T_PT_INDICATOR_FORMULATION_INDICATOR_FORMULATION_ID", column: x => x.INDICATOR_FORMULATION_ID, principalTable: "T_PT_INDICATOR_FORMULATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_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: true), INDICATOR_FORMULATION_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) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_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_PT_INDICATOR_FORMULATION_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_PT_INDICATOR_FORMULATION_FILE_T_PT_INDICATOR_FORMULATION_INDICATOR_FORMULATION_ID", column: x => x.INDICATOR_FORMULATION_ID, principalTable: "T_PT_INDICATOR_FORMULATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_PLAN_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: true), INDICATOR_FORMULATION_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) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_PLAN_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_PLAN_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_PT_INDICATOR_FORMULATION_PLAN_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_PT_INDICATOR_FORMULATION_PLAN_FILE_T_PT_INDICATOR_FORMULATION_INDICATOR_FORMULATION_ID", column: x => x.INDICATOR_FORMULATION_ID, principalTable: "T_PT_INDICATOR_FORMULATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_REQUIREMENTS", 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), FORMULATE_ID = table.Column(type: "uniqueidentifier", nullable: true), FORM_ID = table.Column(type: "uniqueidentifier", nullable: true), INDICATOR_FORMULATION_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) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_REQUIREMENTS", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_REQUIREMENTS_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_REQUIREMENTS_T_PT_FORMULATE_REQUIREMENTS_FORMULATE_ID", column: x => x.FORMULATE_ID, principalTable: "T_PT_FORMULATE_REQUIREMENTS", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_REQUIREMENTS_T_PT_INDICATOR_FORMULATION_INDICATOR_FORMULATION_ID", column: x => x.INDICATOR_FORMULATION_ID, principalTable: "T_PT_INDICATOR_FORMULATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_SAFETY_POLICY_SURVEY", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COMPLETE_DATE = table.Column(type: "datetime2", 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: 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), GUIDELINES_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_DEAL = table.Column(type: "int", nullable: false), IS_DELETED = table.Column(type: "bit", nullable: false), IS_RUN = 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), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_SAFETY_POLICY_SURVEY", x => x.ID); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_T_PT_INTENTIONAL_GUIDELINES_GUIDELINES_ID", column: x => x.GUIDELINES_ID, principalTable: "T_PT_INTENTIONAL_GUIDELINES", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_MONITOR_ASSESSMENT_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), DEPARTMENT_ID = table.Column(type: "uniqueidentifier", 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), MONITOR_ASSESSMENT_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_MONITOR_ASSESSMENT_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_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_PT_MONITOR_ASSESSMENT_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_PT_MONITOR_ASSESSMENT_DETAIL_T_PT_MONITOR_ASSESSMENT_MONITOR_ASSESSMENT_ID", column: x => x.MONITOR_ASSESSMENT_ID, principalTable: "T_PT_MONITOR_ASSESSMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_MONITOR_ASSESSMENT_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), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), MONITOR_ASSESSMENT_ID = table.Column(type: "uniqueidentifier", nullable: false), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_MONITOR_ASSESSMENT_USER", x => x.ID); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_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_PT_MONITOR_ASSESSMENT_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_PT_MONITOR_ASSESSMENT_USER_T_PT_MONITOR_ASSESSMENT_MONITOR_ASSESSMENT_ID", column: x => x.MONITOR_ASSESSMENT_ID, principalTable: "T_PT_MONITOR_ASSESSMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES", 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), INDICATOR_FORMULATION_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), RESOURCES_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES_T_PT_INDICATOR_FORMULATION_INDICATOR_FORMULATION_ID", column: x => x.INDICATOR_FORMULATION_ID, principalTable: "T_PT_INDICATOR_FORMULATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES_T_PT_PLAN_RESOURCES_RESOURCES_ID", column: x => x.RESOURCES_ID, principalTable: "T_PT_PLAN_RESOURCES", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONFORM_PROPERTY = table.Column(type: "int", nullable: true), CONTENTS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CORRECTIVE_PREVENTIVE_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: 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), PRODUCTION_UNIT_ID = table.Column(type: "uniqueidentifier", nullable: true), RECTIFICATION_TIME = table.Column(type: "datetime2", nullable: true), STANDARDIZED_ID = table.Column(type: "uniqueidentifier", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_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_PE_CORRECTIVE_PREVENTIVE_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_PE_CORRECTIVE_PREVENTIVE_DETAIL_T_PE_CORRECTIVE_PREVENTIVE_CORRECTIVE_PREVENTIVE_ID", column: x => x.CORRECTIVE_PREVENTIVE_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_PRODUCTION_UNIT_ID", column: x => x.PRODUCTION_UNIT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_STANDARDIZED_ID", column: x => x.STANDARDIZED_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CORRECTIVE_PREVENTIVE_ID = table.Column(type: "uniqueidentifier", 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: 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), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_T_PE_CORRECTIVE_PREVENTIVE_CORRECTIVE_PREVENTIVE_ID", column: x => x.CORRECTIVE_PREVENTIVE_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_EVALUATION_PLAN_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), EVALUATION_TECHNOLOGY = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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), NUM = table.Column(type: "int", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SAFETY_EVALUATION_PLAN_ID = table.Column(type: "uniqueidentifier", nullable: true), STANDARDIZED_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_PLAN_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_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_PE_SAFETY_EVALUATION_PLAN_DETAIL_T_PE_SAFETY_EVALUATION_PLAN_SAFETY_EVALUATION_PLAN_ID", column: x => x.SAFETY_EVALUATION_PLAN_ID, principalTable: "T_PE_SAFETY_EVALUATION_PLAN", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_STANDARDIZED_ID", column: x => x.STANDARDIZED_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_MONITOR_PLAN_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ASSESSMENT_CYCLE = table.Column(type: "int", nullable: true), CONTENTS = 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: 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), METHOD = table.Column(type: "nvarchar(500)", maxLength: 500, 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), PROJECT_ID = table.Column(type: "uniqueidentifier", nullable: true), SAFETY_MONITOR_PLAN_ID = table.Column(type: "uniqueidentifier", nullable: false), STANDARD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_MONITOR_PLAN_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_PLAN_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_PLAN_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_PE_SAFETY_MONITOR_PLAN_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_PE_SAFETY_MONITOR_PLAN_DETAIL_T_PE_MONITOR_PROJECT_PROJECT_ID", column: x => x.PROJECT_ID, principalTable: "T_PE_MONITOR_PROJECT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_PLAN_DETAIL_T_PE_SAFETY_MONITOR_PLAN_SAFETY_MONITOR_PLAN_ID", column: x => x.SAFETY_MONITOR_PLAN_ID, principalTable: "T_PE_SAFETY_MONITOR_PLAN", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_MONITOR_RECORD", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ASSESSMENT_CYCLE = table.Column(type: "int", 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: 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), SAFETY_MONITOR_PLAN_ID = table.Column(type: "uniqueidentifier", nullable: true), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_MONITOR_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_T_PE_SAFETY_MONITOR_PLAN_SAFETY_MONITOR_PLAN_ID", column: x => x.SAFETY_MONITOR_PLAN_ID, principalTable: "T_PE_SAFETY_MONITOR_PLAN", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_CARRY_SAFE_CONFIRM", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CARRY_RECORD_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_CONFIRM = table.Column(type: "bit", 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), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_CARRY_SAFE_CONFIRM", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_SAFE_CONFIRM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_SAFE_CONFIRM_T_PR_DRUG_CARRY_RECORD_CARRY_RECORD_ID", column: x => x.CARRY_RECORD_ID, principalTable: "T_PR_DRUG_CARRY_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_SAFE_CONFIRM_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_SET_SAFE_CONFIRM", 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), DRUG_SET_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), ROW_NO = table.Column(type: "int", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_SET_SAFE_CONFIRM", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_SET_SAFE_CONFIRM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_SET_SAFE_CONFIRM_T_PR_DRUG_SET_DRUG_SET_ID", column: x => x.DRUG_SET_ID, principalTable: "T_PR_DRUG_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_SET_SPECIFY", 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), DRUG_SET_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), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_SET_SPECIFY", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_SET_SPECIFY_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_SET_SPECIFY_T_PR_DRUG_SET_DRUG_SET_ID", column: x => x.DRUG_SET_ID, principalTable: "T_PR_DRUG_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_EXTERNAL_ACCEPTANCE_RECORD", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), APPLICATION_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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), IS_RELIABLE = table.Column(type: "int", 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), RECTIFICATION_RECORD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), START_TIME = table.Column(type: "datetime2", nullable: true), STATUS = table.Column(type: "int", nullable: false), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_EXTERNAL_ACCEPTANCE_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ACCEPTANCE_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ACCEPTANCE_RECORD_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_APPLICATION_ID", column: x => x.APPLICATION_ID, principalTable: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_TASK_IMPLEMENT_FILE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CHANGE_TASK_IMPLEMENT_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: 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_PR_CHANGE_TASK_IMPLEMENT_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_TASK_IMPLEMENT_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_PR_CHANGE_TASK_IMPLEMENT_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_PR_CHANGE_TASK_IMPLEMENT_FILE_T_PR_CHANGE_TASK_IMPLEMENT_CHANGE_TASK_IMPLEMENT_ID", column: x => x.CHANGE_TASK_IMPLEMENT_ID, principalTable: "T_PR_CHANGE_TASK_IMPLEMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_CHANGE_TASK_IMPLEMENT_USER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CHANGE_TASK_IMPLEMENT_ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_CHANGE_TASK_IMPLEMENT_USER", x => x.ID); table.ForeignKey( name: "FK_T_PR_CHANGE_TASK_IMPLEMENT_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_PR_CHANGE_TASK_IMPLEMENT_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_PR_CHANGE_TASK_IMPLEMENT_USER_T_PR_CHANGE_TASK_IMPLEMENT_CHANGE_TASK_IMPLEMENT_ID", column: x => x.CHANGE_TASK_IMPLEMENT_ID, principalTable: "T_PR_CHANGE_TASK_IMPLEMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONTENT = 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), MEASURES = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), METHOD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), MONOTOR_SUMMARY_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), QUARTER_TYPE = table.Column(type: "int", nullable: false), RESULT_SCORE = table.Column(type: "decimal(18,2)", nullable: true), ROW_NO = table.Column(type: "int", nullable: false), SCORE = table.Column(type: "decimal(18,2)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_MONOTOR_SUMMARY_DETAIL_ID", column: x => x.MONOTOR_SUMMARY_DETAIL_ID, principalTable: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ASSESSMENT_CYCLE = table.Column(type: "int", nullable: false), ASSESSMENT_PLAN_ID = table.Column(type: "uniqueidentifier", nullable: false), CHARGE_NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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: 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), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), YEAR = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_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_PT_ASSESSMENT_PLAN_AUDIT_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_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_T_PT_ASSESSMENT_PLAN_AUDIT_ASSESSMENT_PLAN_ID", column: x => x.ASSESSMENT_PLAN_ID, principalTable: "T_PT_ASSESSMENT_PLAN_AUDIT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_FILE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), ASSESSMENT_PLAN_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: 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_PT_ASSESSMENT_PLAN_AUDIT_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_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_PT_ASSESSMENT_PLAN_AUDIT_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_PT_ASSESSMENT_PLAN_AUDIT_FILE_T_PT_ASSESSMENT_PLAN_AUDIT_ASSESSMENT_PLAN_ID", column: x => x.ASSESSMENT_PLAN_ID, principalTable: "T_PT_ASSESSMENT_PLAN_AUDIT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_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), DEPARTMENT_ID = table.Column(type: "uniqueidentifier", 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), INDICATOR_FORMULATION_DEPARTMENT_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) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_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_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_T_PT_INDICATOR_FORMULATION_DEPARTMENT_INDICATOR_FORMULATION_DEPARTMENT_ID", column: x => x.INDICATOR_FORMULATION_DEPARTMENT_ID, principalTable: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_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: true), INDICATOR_FORMULATION_DEPARTMENT_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) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_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_PT_INDICATOR_FORMULATION_DEPARTMENT_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_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE_T_PT_INDICATOR_FORMULATION_DEPARTMENT_INDICATOR_FORMULATION_DEPARTMENT_ID", column: x => x.INDICATOR_FORMULATION_DEPARTMENT_ID, principalTable: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", 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), INDICATOR_FORMULATION_DEPARTMENT_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), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_T_PT_INDICATOR_FORMULATION_DEPARTMENT_INDICATOR_FORMULATION_DEPARTMENT_ID", column: x => x.INDICATOR_FORMULATION_DEPARTMENT_ID, principalTable: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_SAFETY_POLICY_SURVEY_COLLECT", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COLLECT_ID = table.Column(type: "uniqueidentifier", 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), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SAFETY_POLICY_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_SAFETY_POLICY_SURVEY_COLLECT", x => x.ID); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_COLLECT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_COLLECT_T_PT_COLLECT_REQUIREMENTS_COLLECT_ID", column: x => x.COLLECT_ID, principalTable: "T_PT_COLLECT_REQUIREMENTS", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_COLLECT_T_PT_SAFETY_POLICY_SURVEY_SAFETY_POLICY_ID", column: x => x.SAFETY_POLICY_ID, principalTable: "T_PT_SAFETY_POLICY_SURVEY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", 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: 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), GUIDELINES_ID = table.Column(type: "uniqueidentifier", nullable: true), IS_AGREE = table.Column(type: "bit", 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), OTHER_SUGGESTIONS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), SAFETY_POLICY_ID = table.Column(type: "uniqueidentifier", nullable: false), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", x => x.ID); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_T_PT_INTENTIONAL_GUIDELINES_GUIDELINES_ID", column: x => x.GUIDELINES_ID, principalTable: "T_PT_INTENTIONAL_GUIDELINES", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_T_PT_SAFETY_POLICY_SURVEY_SAFETY_POLICY_ID", column: x => x.SAFETY_POLICY_ID, principalTable: "T_PT_SAFETY_POLICY_SURVEY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_SAFETY_POLICY_SURVEY_RANGE", 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: 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), SAFETY_POLICY_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_SAFETY_POLICY_SURVEY_RANGE", x => x.ID); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_RANGE_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_RANGE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_SAFETY_POLICY_SURVEY_RANGE_T_PT_SAFETY_POLICY_SURVEY_SAFETY_POLICY_ID", column: x => x.SAFETY_POLICY_ID, principalTable: "T_PT_SAFETY_POLICY_SURVEY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONTENT = 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), MEASURES = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), METHOD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), MONITOR_ASSESSMENT_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), RESULT_SCORE = table.Column(type: "decimal(18,2)", nullable: true), ROW_NO = table.Column(type: "int", nullable: false), SCORE = table.Column(type: "decimal(18,2)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT_T_PT_MONITOR_ASSESSMENT_DETAIL_MONITOR_ASSESSMENT_DETAIL_ID", column: x => x.MONITOR_ASSESSMENT_DETAIL_ID, principalTable: "T_PT_MONITOR_ASSESSMENT_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COMMENTS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CORRECTIVE_PREVENTIVE_PROCESS_ID = table.Column(type: "uniqueidentifier", 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: 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), STATUS = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_CORRECTIVE_PREVENTIVE_PROCESS_ID", column: x => x.CORRECTIVE_PREVENTIVE_PROCESS_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONTENTS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CORRECTIVE_PREVENTIVE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CORRECTIVE_PREVENTIVE_PROCESS_ID = table.Column(type: "uniqueidentifier", nullable: false), CORRECT_TIME = table.Column(type: "datetime2", nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), NOT_CARRY_OUT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PRODUCTION_UNIT_ID = table.Column(type: "uniqueidentifier", nullable: true), REASON = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), RECTIFICATION_TIME = table.Column(type: "datetime2", nullable: true), SITUATION = table.Column(type: "int", nullable: true), STANDARDIZED_ID = table.Column(type: "uniqueidentifier", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_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_PE_CORRECTIVE_PREVENTIVE_PROCESS_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_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_CORRECTIVE_PREVENTIVE_PROCESS_ID", column: x => x.CORRECTIVE_PREVENTIVE_PROCESS_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_PRODUCTION_UNIT_ID", column: x => x.PRODUCTION_UNIT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_STANDARDIZED_ID", column: x => x.STANDARDIZED_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_EVALUATION_PLAN_METHOD", 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), EVALUATION_PLAN_DETAIL_ID = table.Column(type: "uniqueidentifier", 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), METHOD_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) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_PLAN_METHOD", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_METHOD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_METHOD_T_PE_EVALUATION_METHOD_METHOD_ID", column: x => x.METHOD_ID, principalTable: "T_PE_EVALUATION_METHOD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_METHOD_T_PE_SAFETY_EVALUATION_PLAN_DETAIL_EVALUATION_PLAN_DETAIL_ID", column: x => x.EVALUATION_PLAN_DETAIL_ID, principalTable: "T_PE_SAFETY_EVALUATION_PLAN_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_EVALUATION_PLAN_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), DEAL_STATUS = table.Column(type: "int", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EVALUATION_PLAN_DETAIL_ID = table.Column(type: "uniqueidentifier", 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), ROW_NO = table.Column(type: "int", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_PLAN_USER", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_PLAN_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_PE_SAFETY_EVALUATION_PLAN_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_PE_SAFETY_EVALUATION_PLAN_USER_T_PE_SAFETY_EVALUATION_PLAN_DETAIL_EVALUATION_PLAN_DETAIL_ID", column: x => x.EVALUATION_PLAN_DETAIL_ID, principalTable: "T_PE_SAFETY_EVALUATION_PLAN_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_EVALUATION_RECORD", 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: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EVALUATION_PLAN_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: true), EVALUATION_PLAN_ID = table.Column(type: "uniqueidentifier", nullable: true), 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), STATUS = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_T_PE_SAFETY_EVALUATION_PLAN_DETAIL_EVALUATION_PLAN_DETAIL_ID", column: x => x.EVALUATION_PLAN_DETAIL_ID, principalTable: "T_PE_SAFETY_EVALUATION_PLAN_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_T_PE_SAFETY_EVALUATION_PLAN_EVALUATION_PLAN_ID", column: x => x.EVALUATION_PLAN_ID, principalTable: "T_PE_SAFETY_EVALUATION_PLAN", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_MONITOR_RECORD_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONTENTS = 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), METHOD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), MONITOR_LIVE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PROJECT_ID = table.Column(type: "uniqueidentifier", nullable: true), RESULT_DISCUSS = table.Column(type: "int", nullable: true), SAFETY_MONITOR_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), STANDARD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_MONITOR_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_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_PE_SAFETY_MONITOR_RECORD_DETAIL_T_PE_MONITOR_PROJECT_PROJECT_ID", column: x => x.PROJECT_ID, principalTable: "T_PE_MONITOR_PROJECT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_DETAIL_T_PE_SAFETY_MONITOR_RECORD_SAFETY_MONITOR_RECORD_ID", column: x => x.SAFETY_MONITOR_RECORD_ID, principalTable: "T_PE_SAFETY_MONITOR_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_MONITOR_RECORD_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), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SAFETY_MONITOR_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_MONITOR_RECORD_USER", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_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_PE_SAFETY_MONITOR_RECORD_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_PE_SAFETY_MONITOR_RECORD_USER_T_PE_SAFETY_MONITOR_RECORD_SAFETY_MONITOR_RECORD_ID", column: x => x.SAFETY_MONITOR_RECORD_ID, principalTable: "T_PE_SAFETY_MONITOR_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_CARRY_RECORD_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CARRY_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), CARRY_TIME = table.Column(type: "datetime2", nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEPARTMENT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), DRUG_SET_ID = table.Column(type: "uniqueidentifier", 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), PLACE_ID = table.Column(type: "uniqueidentifier", nullable: true), QTY = table.Column(type: "int", nullable: false), SPECIFY_ID = table.Column(type: "uniqueidentifier", nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_CARRY_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_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_PR_DRUG_CARRY_RECORD_DETAIL_T_PR_DRUG_CARRY_RECORD_CARRY_RECORD_ID", column: x => x.CARRY_RECORD_ID, principalTable: "T_PR_DRUG_CARRY_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_DETAIL_T_PR_DRUG_PLACE_PLACE_ID", column: x => x.PLACE_ID, principalTable: "T_PR_DRUG_PLACE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_DETAIL_T_PR_DRUG_SET_DRUG_SET_ID", column: x => x.DRUG_SET_ID, principalTable: "T_PR_DRUG_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_DETAIL_T_PR_DRUG_SET_SPECIFY_SPECIFY_ID", column: x => x.SPECIFY_ID, principalTable: "T_PR_DRUG_SET_SPECIFY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_DETAIL_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CARRY_TIME = table.Column(type: "datetime2", nullable: true), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEPARTMENT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), DRUG_SET_ID = table.Column(type: "uniqueidentifier", 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), OUTBOUND_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false), PLACE_ID = table.Column(type: "uniqueidentifier", nullable: true), QTY = table.Column(type: "int", nullable: false), SPECIFY_ID = table.Column(type: "uniqueidentifier", nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_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_PR_DRUG_OUTBOUND_RECORD_DETAIL_T_PR_DRUG_OUTBOUND_RECORD_OUTBOUND_RECORD_ID", column: x => x.OUTBOUND_RECORD_ID, principalTable: "T_PR_DRUG_OUTBOUND_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_T_PR_DRUG_PLACE_PLACE_ID", column: x => x.PLACE_ID, principalTable: "T_PR_DRUG_PLACE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_T_PR_DRUG_SET_DRUG_SET_ID", column: x => x.DRUG_SET_ID, principalTable: "T_PR_DRUG_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_T_PR_DRUG_SET_SPECIFY_SPECIFY_ID", column: x => x.SPECIFY_ID, principalTable: "T_PR_DRUG_SET_SPECIFY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_USE_RECORD", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CARRY_RECORD_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 = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), DEPARTMENT_ID = table.Column(type: "uniqueidentifier", nullable: true), DRUG_SET_ID = table.Column(type: "uniqueidentifier", 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), QTY = table.Column(type: "int", nullable: false), SPECIFY_ID = table.Column(type: "uniqueidentifier", nullable: true), STATUS = table.Column(type: "int", nullable: false), TIME = table.Column(type: "datetime2", nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_USE_RECORD", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_T_PR_DRUG_CARRY_RECORD_CARRY_RECORD_ID", column: x => x.CARRY_RECORD_ID, principalTable: "T_PR_DRUG_CARRY_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_T_PR_DRUG_SET_DRUG_SET_ID", column: x => x.DRUG_SET_ID, principalTable: "T_PR_DRUG_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_T_PR_DRUG_SET_SPECIFY_SPECIFY_ID", column: x => x.SPECIFY_ID, principalTable: "T_PR_DRUG_SET_SPECIFY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE", 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), EXTERNAL_ACCEPTANCE_RECORD_ID = table.Column(type: "uniqueidentifier", 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: 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_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE", x => x.ID); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE_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_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE_T_PR_EXTERNAL_ACCEPTANCE_RECORD_EXTERNAL_ACCEPTANCE_RECORD_ID", column: x => x.EXTERNAL_ACCEPTANCE_RECORD_ID, principalTable: "T_PR_EXTERNAL_ACCEPTANCE_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_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), EXTERNAL_ACCEPTANCE_RECORD_ID = table.Column(type: "uniqueidentifier", 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: 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_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PR_EXTERNAL_ACCEPTANCE_RECORD_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_PR_EXTERNAL_ACCEPTANCE_RECORD_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_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE_T_PR_EXTERNAL_ACCEPTANCE_RECORD_EXTERNAL_ACCEPTANCE_RECORD_ID", column: x => x.EXTERNAL_ACCEPTANCE_RECORD_ID, principalTable: "T_PR_EXTERNAL_ACCEPTANCE_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT", 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), METHOD = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), 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), PLAN_AUDIT_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false), SCORE = table.Column(type: "decimal(18,2)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_PLAN_AUDIT_DETAIL_ID", column: x => x.PLAN_AUDIT_DETAIL_ID, principalTable: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT", 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), INDICATOR_FORMULATION_DEPARTMENT_DETAIL_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), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_INDICATOR_FORMULATION_DEPA~", column: x => x.INDICATOR_FORMULATION_DEPARTMENT_DETAIL_ID, principalTable: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT", 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), INDICATOR_FORMULATION_DEPARTMENT_TEAM_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), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT", x => x.ID); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_INDICATOR_FORMULATION_DEPARTME~", column: x => x.INDICATOR_FORMULATION_DEPARTMENT_TEAM_ID, principalTable: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONSIDER_ID = table.Column(type: "uniqueidentifier", nullable: true), CORRECTIVE_PREVENTIVE_EVALUATION_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) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CORRECTIVE_PREVENTIVE_EVALUATION_ID", column: x => x.CORRECTIVE_PREVENTIVE_EVALUATION_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER_T_PE_MEASURE_CONSIDER_CONSIDER_ID", column: x => x.CONSIDER_ID, principalTable: "T_PE_MEASURE_CONSIDER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), COMMENTS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CONTENTS = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CORRECTIVE_PREVENTIVE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), CORRECTIVE_PREVENTIVE_EVALUATION_ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEAL_STATUS = table.Column(type: "int", nullable: false), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EVALUATE_RESULT = table.Column(type: "int", nullable: true), 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), NOT_CARRY_OUT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), SITUATION = table.Column(type: "int", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_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_PE_CORRECTIVE_PREVENTIVE_EVALUATION_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_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CORRECTIVE_PREVENTIVE_EVALUATION_ID", column: x => x.CORRECTIVE_PREVENTIVE_EVALUATION_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_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: 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_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_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_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_CORRECTIVE_PREVENTIVE_PROCESS_DETAI~", column: x => x.CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_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_PE_SAFETY_EVALUATION_RECORD_DETAIL", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONTENTS = 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), DEAL_STATUS = table.Column(type: "int", nullable: false), DESCRIPTION = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ENTITY_ORG_TPYE = table.Column(type: "int", nullable: false), EVALUATION_ITEM = table.Column(type: "int", nullable: true), EVALUATION_RESULT = table.Column(type: "int", nullable: true), 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), GROUP_NO = table.Column(type: "nvarchar(500)", maxLength: 500, 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), NON_CONFORMANCE = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), NON_STANDARDIZED_SCORE = table.Column(type: "decimal(18,2)", nullable: true), NUM = table.Column(type: "int", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), PRIMARY_ELEMENTS_ID = table.Column(type: "uniqueidentifier", nullable: true), PRODUCTION_UNIT_ID = table.Column(type: "uniqueidentifier", nullable: true), RESULT_SCORE = table.Column(type: "decimal(18,2)", nullable: true), SAFETY_EVALUATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: true), SECOND_ELEMENTS_ID = table.Column(type: "uniqueidentifier", nullable: true), STANDARDIZED_SCORE = table.Column(type: "decimal(18,2)", nullable: true), THREE_ELEMENTS_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_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_PE_SAFETY_EVALUATION_RECORD_DETAIL_T_PE_SAFETY_EVALUATION_RECORD_SAFETY_EVALUATION_RECORD_ID", column: x => x.SAFETY_EVALUATION_RECORD_ID, principalTable: "T_PE_SAFETY_EVALUATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_PRIMARY_ELEMENTS_ID", column: x => x.PRIMARY_ELEMENTS_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_PRODUCTION_UNIT_ID", column: x => x.PRODUCTION_UNIT_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_SECOND_ELEMENTS_ID", column: x => x.SECOND_ELEMENTS_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_T_PE_STANDARDIZED_SCORE_IMPORT_THREE_ELEMENTS_ID", column: x => x.THREE_ELEMENTS_ID, principalTable: "T_PE_STANDARDIZED_SCORE_IMPORT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_EVALUATION_RECORD_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), DEAL_STATUS = 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), GROUP_NO = table.Column(type: "int", 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), ROW_NO = table.Column(type: "int", nullable: false), SAFETY_EVALUATION_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_RECORD_USER", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_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_PE_SAFETY_EVALUATION_RECORD_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_PE_SAFETY_EVALUATION_RECORD_USER_T_PE_SAFETY_EVALUATION_RECORD_SAFETY_EVALUATION_RECORD_ID", column: x => x.SAFETY_EVALUATION_RECORD_ID, principalTable: "T_PE_SAFETY_EVALUATION_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_SAFETY_MONITOR_RECORD_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: 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), SAFETY_MONITOR_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_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_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE_T_PE_SAFETY_MONITOR_RECORD_DETAIL_SAFETY_MONITOR_RECORD_DETAIL_ID", column: x => x.SAFETY_MONITOR_RECORD_DETAIL_ID, principalTable: "T_PE_SAFETY_MONITOR_RECORD_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_MONITOR_RECORD_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_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CARRY_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT_T_PR_DRUG_CARRY_RECORD_DETAIL_CARRY_RECORD_DETAIL_ID", column: x => x.CARRY_RECORD_DETAIL_ID, principalTable: "T_PR_DRUG_CARRY_RECORD_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_CARRY_RECORD_DETAIL_USER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CARRY_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), CREATER_ID = table.Column(type: "uniqueidentifier", nullable: true), CREATE_TIME = table.Column(type: "datetime2", nullable: true), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_CARRY_RECORD_DETAIL_USER", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_CARRY_RECORD_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_PR_DRUG_CARRY_RECORD_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_PR_DRUG_CARRY_RECORD_DETAIL_USER_T_PR_DRUG_CARRY_RECORD_DETAIL_CARRY_RECORD_DETAIL_ID", column: x => x.CARRY_RECORD_DETAIL_ID, principalTable: "T_PR_DRUG_CARRY_RECORD_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT", 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), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), OUTBOUND_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_OUTBOUND_RECORD_DETAIL_ID", column: x => x.OUTBOUND_RECORD_DETAIL_ID, principalTable: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_OUTBOUND_RECORD_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), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), OUTBOUND_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_OUTBOUND_RECORD_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_PR_DRUG_OUTBOUND_RECORD_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_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_OUTBOUND_RECORD_DETAIL_ID", column: x => x.OUTBOUND_RECORD_DETAIL_ID, principalTable: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_USE_RECORD_CONFIRM", 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_CONFIRM = table.Column(type: "bit", 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), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), USE_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_USE_RECORD_CONFIRM", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_CONFIRM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_CONFIRM_T_PR_DRUG_USE_RECORD_USE_RECORD_ID", column: x => x.USE_RECORD_ID, principalTable: "T_PR_DRUG_USE_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_USE_RECORD_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), DRUG_SET_ID = table.Column(type: "uniqueidentifier", 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), QTY = table.Column(type: "int", nullable: false), SPECIFY_ID = table.Column(type: "uniqueidentifier", nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), USE_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_USE_RECORD_DETAIL", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_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_PR_DRUG_USE_RECORD_DETAIL_T_PR_DRUG_SET_DRUG_SET_ID", column: x => x.DRUG_SET_ID, principalTable: "T_PR_DRUG_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_DETAIL_T_PR_DRUG_SET_SPECIFY_SPECIFY_ID", column: x => x.SPECIFY_ID, principalTable: "T_PR_DRUG_SET_SPECIFY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_DETAIL_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_DETAIL_T_PR_DRUG_USE_RECORD_USE_RECORD_ID", column: x => x.USE_RECORD_ID, principalTable: "T_PR_DRUG_USE_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_USE_RECORD_PRINT", 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: true), DRUG_SET_ID = table.Column(type: "uniqueidentifier", 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), QTY = table.Column(type: "int", nullable: false), SPECIFY_ID = table.Column(type: "uniqueidentifier", nullable: true), TIME = table.Column(type: "datetime2", nullable: true), TYPE_ID = table.Column(type: "uniqueidentifier", nullable: true), UNIT = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), USE_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: true), USE_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_USE_RECORD_PRINT", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_PRINT_T_FM_DEPARTMENT_DEPARTMENT_ID", column: x => x.DEPARTMENT_ID, principalTable: "T_FM_DEPARTMENT", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_PRINT_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_PRINT_T_FM_USER_USER_ID", column: x => x.USER_ID, principalTable: "T_FM_USER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_PRINT_T_PR_DRUG_SET_DRUG_SET_ID", column: x => x.DRUG_SET_ID, principalTable: "T_PR_DRUG_SET", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_PRINT_T_PR_DRUG_SET_SPECIFY_SPECIFY_ID", column: x => x.SPECIFY_ID, principalTable: "T_PR_DRUG_SET_SPECIFY", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_PRINT_T_PR_DRUG_TYPE_TYPE_ID", column: x => x.TYPE_ID, principalTable: "T_PR_DRUG_TYPE", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_PRINT_T_PR_DRUG_USE_RECORD_USE_RECORD_ID", column: x => x.USE_RECORD_ID, principalTable: "T_PR_DRUG_USE_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_USE_RECORD_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), DEAL_STATUS = 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), MODIFIER_ID = table.Column(type: "uniqueidentifier", nullable: true), MODIFY_TIME = table.Column(type: "datetime2", nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), ROW_NO = table.Column(type: "int", nullable: true), USER_ID = table.Column(type: "uniqueidentifier", nullable: true), USE_RECORD_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_USE_RECORD_USER", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_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_PR_DRUG_USE_RECORD_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_PR_DRUG_USE_RECORD_USER_T_PR_DRUG_USE_RECORD_USE_RECORD_ID", column: x => x.USE_RECORD_ID, principalTable: "T_PR_DRUG_USE_RECORD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CONSIDER_ID = table.Column(type: "uniqueidentifier", nullable: true), CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_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) }, constraints: table => { table.PrimaryKey("PK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CORRECTIVE_PREVENTIVE_EVA~", column: x => x.CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER_T_PE_MEASURE_CONSIDER_CONSIDER_ID", column: x => x.CONSIDER_ID, principalTable: "T_PE_MEASURE_CONSIDER", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE", columns: table => new { ID = table.Column(type: "uniqueidentifier", nullable: false), CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_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: 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_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE", x => x.ID); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_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_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CORRECTIVE_PREVENTIVE_EVALUAT~", column: x => x.CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID, principalTable: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_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_PE_SAFETY_EVALUATION_RECORD_METHOD", 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), METHOD_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), SAFETY_EVALUATION_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_T_PE_SAFETY_EVALUATION_RECORD_METHOD", x => x.ID); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_METHOD_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_METHOD_T_PE_EVALUATION_METHOD_METHOD_ID", column: x => x.METHOD_ID, principalTable: "T_PE_EVALUATION_METHOD", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PE_SAFETY_EVALUATION_RECORD_METHOD_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_SAFETY_EVALUATION_RECORD_DETAIL_ID", column: x => x.SAFETY_EVALUATION_RECORD_DETAIL_ID, principalTable: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM", 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_CONFIRM = table.Column(type: "bit", 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), NAME = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), ORG_ID = table.Column(type: "uniqueidentifier", nullable: false), USE_RECORD_DETAIL_ID = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM", x => x.ID); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM_T_FM_ORGANIZATION_ORG_ID", column: x => x.ORG_ID, principalTable: "T_FM_ORGANIZATION", principalColumn: "ID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM_T_PR_DRUG_USE_RECORD_DETAIL_USE_RECORD_DETAIL_ID", column: x => x.USE_RECORD_DETAIL_ID, principalTable: "T_PR_DRUG_USE_RECORD_DETAIL", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_T_PE_ASSESSMENT_ITEM_ORG_ID", table: "T_PE_ASSESSMENT_ITEM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_DEPARTMENT_ID", table: "T_PE_CORRECTIVE_PREVENTIVE", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PRODUCTION_UNIT_ID", table: "T_PE_CORRECTIVE_PREVENTIVE", column: "PRODUCTION_UNIT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_USER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_CORRECTIVE_PREVENTIVE_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL", column: "CORRECTIVE_PREVENTIVE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_DEPARTMENT_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_PRODUCTION_UNIT_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL", column: "PRODUCTION_UNIT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_STANDARDIZED_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL", column: "STANDARDIZED_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_DETAIL_USER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CORRECTIVE_PREVENTIVE_PROCESS_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", column: "CORRECTIVE_PREVENTIVE_PROCESS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DEPARTMENT_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_USER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER_CONSIDER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER", column: "CONSIDER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER_CORRECTIVE_PREVENTIVE_EVALUATION_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER", column: "CORRECTIVE_PREVENTIVE_EVALUATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_CONSIDER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CORRECTIVE_PREVENTIVE_EVALUATION_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", column: "CORRECTIVE_PREVENTIVE_EVALUATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_USER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER_CONSIDER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER", column: "CONSIDER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER", column: "CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_CONSIDER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE", column: "CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE_IMG_FILE_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_EVALUATION_DETAIL_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_CORRECTIVE_PREVENTIVE_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS", column: "CORRECTIVE_PREVENTIVE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DEPARTMENT_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_USER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_CORRECTIVE_PREVENTIVE_PROCESS_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", column: "CORRECTIVE_PREVENTIVE_PROCESS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_PRODUCTION_UNIT_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", column: "PRODUCTION_UNIT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_STANDARDIZED_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", column: "STANDARDIZED_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_USER_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE", column: "CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE_IMG_FILE_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE_ORG_ID", table: "T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_EVALUATION_METHOD_ORG_ID", table: "T_PE_EVALUATION_METHOD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_MEASURE_CONSIDER_ORG_ID", table: "T_PE_MEASURE_CONSIDER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_MONITOR_PROJECT_ORG_ID", table: "T_PE_MONITOR_PROJECT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_ORG_ID", table: "T_PE_SAFETY_EVALUATION_PLAN", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_PRODUCTION_UNIT_ID", table: "T_PE_SAFETY_EVALUATION_PLAN", column: "PRODUCTION_UNIT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_DETAIL_ORG_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_DETAIL_SAFETY_EVALUATION_PLAN_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_DETAIL", column: "SAFETY_EVALUATION_PLAN_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_DETAIL_STANDARDIZED_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_DETAIL", column: "STANDARDIZED_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_METHOD_EVALUATION_PLAN_DETAIL_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_METHOD", column: "EVALUATION_PLAN_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_METHOD_METHOD_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_METHOD", column: "METHOD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_METHOD_ORG_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_METHOD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_USER_EVALUATION_PLAN_DETAIL_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_USER", column: "EVALUATION_PLAN_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_USER_ORG_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_PLAN_USER_USER_ID", table: "T_PE_SAFETY_EVALUATION_PLAN_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_EVALUATION_PLAN_DETAIL_ID", table: "T_PE_SAFETY_EVALUATION_RECORD", column: "EVALUATION_PLAN_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_EVALUATION_PLAN_ID", table: "T_PE_SAFETY_EVALUATION_RECORD", column: "EVALUATION_PLAN_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_ORG_ID", table: "T_PE_SAFETY_EVALUATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_ORG_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_PRIMARY_ELEMENTS_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL", column: "PRIMARY_ELEMENTS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_PRODUCTION_UNIT_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL", column: "PRODUCTION_UNIT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_SAFETY_EVALUATION_RECORD_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL", column: "SAFETY_EVALUATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_SECOND_ELEMENTS_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL", column: "SECOND_ELEMENTS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_DETAIL_THREE_ELEMENTS_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_DETAIL", column: "THREE_ELEMENTS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_METHOD_METHOD_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_METHOD", column: "METHOD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_METHOD_ORG_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_METHOD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_METHOD_SAFETY_EVALUATION_RECORD_DETAIL_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_METHOD", column: "SAFETY_EVALUATION_RECORD_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_USER_ORG_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_USER_SAFETY_EVALUATION_RECORD_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_USER", column: "SAFETY_EVALUATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_EVALUATION_RECORD_USER_USER_ID", table: "T_PE_SAFETY_EVALUATION_RECORD_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_DEPARTMENT_ID", table: "T_PE_SAFETY_MONITOR_PLAN", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_ORG_ID", table: "T_PE_SAFETY_MONITOR_PLAN", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_PRODUCTION_UNIT_ID", table: "T_PE_SAFETY_MONITOR_PLAN", column: "PRODUCTION_UNIT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_USER_ID", table: "T_PE_SAFETY_MONITOR_PLAN", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_DETAIL_DEPARTMENT_ID", table: "T_PE_SAFETY_MONITOR_PLAN_DETAIL", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_DETAIL_ORG_ID", table: "T_PE_SAFETY_MONITOR_PLAN_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_DETAIL_PROJECT_ID", table: "T_PE_SAFETY_MONITOR_PLAN_DETAIL", column: "PROJECT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_DETAIL_SAFETY_MONITOR_PLAN_ID", table: "T_PE_SAFETY_MONITOR_PLAN_DETAIL", column: "SAFETY_MONITOR_PLAN_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_PLAN_DETAIL_USER_ID", table: "T_PE_SAFETY_MONITOR_PLAN_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_DEPARTMENT_ID", table: "T_PE_SAFETY_MONITOR_RECORD", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_ORG_ID", table: "T_PE_SAFETY_MONITOR_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_SAFETY_MONITOR_PLAN_ID", table: "T_PE_SAFETY_MONITOR_RECORD", column: "SAFETY_MONITOR_PLAN_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_USER_ID", table: "T_PE_SAFETY_MONITOR_RECORD", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_DETAIL_ORG_ID", table: "T_PE_SAFETY_MONITOR_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_DETAIL_PROJECT_ID", table: "T_PE_SAFETY_MONITOR_RECORD_DETAIL", column: "PROJECT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_DETAIL_SAFETY_MONITOR_RECORD_ID", table: "T_PE_SAFETY_MONITOR_RECORD_DETAIL", column: "SAFETY_MONITOR_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE_IMG_FILE_ID", table: "T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE_ORG_ID", table: "T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE_SAFETY_MONITOR_RECORD_DETAIL_ID", table: "T_PE_SAFETY_MONITOR_RECORD_DETAIL_FILE", column: "SAFETY_MONITOR_RECORD_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_USER_ORG_ID", table: "T_PE_SAFETY_MONITOR_RECORD_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_USER_SAFETY_MONITOR_RECORD_ID", table: "T_PE_SAFETY_MONITOR_RECORD_USER", column: "SAFETY_MONITOR_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_SAFETY_MONITOR_RECORD_USER_USER_ID", table: "T_PE_SAFETY_MONITOR_RECORD_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_ORG_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_PARENT_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT", column: "PARENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_ORG_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_PRIMARY_ELEMENTS_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", column: "PRIMARY_ELEMENTS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_PRODUCTION_UNIT_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", column: "PRODUCTION_UNIT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_SECOND_ELEMENTS_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", column: "SECOND_ELEMENTS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL_THREE_ELEMENTS_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT_DETAIL", column: "THREE_ELEMENTS_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_ITEM_ORG_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT_ITEM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PE_STANDARDIZED_SCORE_IMPORT_ITEM_STANDARDIZED_SCORE_IMPORT_ID", table: "T_PE_STANDARDIZED_SCORE_IMPORT_ITEM", column: "STANDARDIZED_SCORE_IMPORT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_AUDIT_REQUIREMENT_ORG_ID", table: "T_PR_AUDIT_REQUIREMENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_ACCEPTANCE_CHANGE_IDENTIFY_EVALUATION_ID", table: "T_PR_CHANGE_ACCEPTANCE", column: "CHANGE_IDENTIFY_EVALUATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_ACCEPTANCE_DEPARTMENT_ID", table: "T_PR_CHANGE_ACCEPTANCE", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_ACCEPTANCE_ORG_ID", table: "T_PR_CHANGE_ACCEPTANCE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_ACCEPTANCE_USER_ID", table: "T_PR_CHANGE_ACCEPTANCE", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_DEPARTMENT_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_ORG_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_USER_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_CHANGE_IDENTIFY_EVALUATION_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", column: "CHANGE_IDENTIFY_EVALUATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_ORG_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_TASK_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", column: "TASK_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_TASK_USER_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION_TASK", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE_CHANGE_IDENTIFY_EVALUATION_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE", column: "CHANGE_IDENTIFY_EVALUATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE_ORG_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE_TYPE_ID", table: "T_PR_CHANGE_IDENTIFY_EVALUATION_TYPE", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_CHANGE_IDENTIFY_EVALUATION_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT", column: "CHANGE_IDENTIFY_EVALUATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_DEPARTMENT_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_ORG_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_TASK_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT", column: "TASK_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_USER_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_FILE_CHANGE_TASK_IMPLEMENT_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT_FILE", column: "CHANGE_TASK_IMPLEMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_FILE_IMG_FILE_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_FILE_ORG_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_USER_CHANGE_TASK_IMPLEMENT_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT_USER", column: "CHANGE_TASK_IMPLEMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_USER_ORG_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TASK_IMPLEMENT_USER_USER_ID", table: "T_PR_CHANGE_TASK_IMPLEMENT_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CHANGE_TYPE_ORG_ID", table: "T_PR_CHANGE_TYPE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_ORG_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_AIR_OPERATION_RECORD_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_AIR", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_AIR_ORG_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_AIR", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_DEAL_OPERATION_RECORD_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_DEAL", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_DEAL_ORG_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_DEAL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_DRUG_OPERATION_RECORD_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_DRUG", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_DRUG_ORG_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_DRUG", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_SERI_OPERATION_RECORD_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_SERI", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_CONTROLROOM_OPERATION_RECORD_SERI_ORG_ID", table: "T_PR_CONTROLROOM_OPERATION_RECORD_SERI", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DEPARTMENT_STEP_LINK_DEPARTMENT_ID", table: "T_PR_DEPARTMENT_STEP_LINK", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DEPARTMENT_STEP_LINK_OPERATION_STEP_ID", table: "T_PR_DEPARTMENT_STEP_LINK", column: "OPERATION_STEP_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DEPARTMENT_STEP_LINK_ORG_ID", table: "T_PR_DEPARTMENT_STEP_LINK", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_DEPARTMENT_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_ORG_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_USER_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_FILE_DESIGN_DOCUMENT_REVIEW_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW_FILE", column: "DESIGN_DOCUMENT_REVIEW_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_FILE_IMG_FILE_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_FILE_ORG_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT_DESIGN_DOCUMENT_REVIEW_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT", column: "DESIGN_DOCUMENT_REVIEW_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT_ORG_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT_REQUIREMENT_ID", table: "T_PR_DESIGN_DOCUMENT_REVIEW_REQUIREMENT", column: "REQUIREMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_ORG_ID", table: "T_PR_DRUG_CARRY_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_OUTBOUND_RECORD_ID", table: "T_PR_DRUG_CARRY_RECORD", column: "OUTBOUND_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_TYPE_ID", table: "T_PR_DRUG_CARRY_RECORD", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_CARRY_RECORD_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL", column: "CARRY_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_DRUG_SET_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL", column: "DRUG_SET_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_ORG_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_PLACE_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL", column: "PLACE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_SPECIFY_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL", column: "SPECIFY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_TYPE_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT_CARRY_RECORD_DETAIL_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT", column: "CARRY_RECORD_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT_ORG_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT_USER_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL_ACCEPT", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_USER_CARRY_RECORD_DETAIL_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL_USER", column: "CARRY_RECORD_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_USER_ORG_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_RECORD_DETAIL_USER_USER_ID", table: "T_PR_DRUG_CARRY_RECORD_DETAIL_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_SAFE_CONFIRM_CARRY_RECORD_ID", table: "T_PR_DRUG_CARRY_SAFE_CONFIRM", column: "CARRY_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_SAFE_CONFIRM_ORG_ID", table: "T_PR_DRUG_CARRY_SAFE_CONFIRM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_CARRY_SAFE_CONFIRM_TYPE_ID", table: "T_PR_DRUG_CARRY_SAFE_CONFIRM", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DEPARTMENT_ID", table: "T_PR_DRUG_OUTBOUND_RECORD", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_ORG_ID", table: "T_PR_DRUG_OUTBOUND_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_USER_ID", table: "T_PR_DRUG_OUTBOUND_RECORD", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_DRUG_SET_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", column: "DRUG_SET_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ORG_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_OUTBOUND_RECORD_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", column: "OUTBOUND_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_PLACE_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", column: "PLACE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_SPECIFY_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", column: "SPECIFY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_TYPE_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT_ORG_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT_OUTBOUND_RECORD_DETAIL_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT", column: "OUTBOUND_RECORD_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT_USER_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_ACCEPT", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER_ORG_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER_OUTBOUND_RECORD_DETAIL_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER", column: "OUTBOUND_RECORD_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER_USER_ID", table: "T_PR_DRUG_OUTBOUND_RECORD_DETAIL_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_PLACE_ORG_ID", table: "T_PR_DRUG_PLACE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_SET_ORG_ID", table: "T_PR_DRUG_SET", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_SET_TYPE_ID", table: "T_PR_DRUG_SET", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_SET_SAFE_CONFIRM_DRUG_SET_ID", table: "T_PR_DRUG_SET_SAFE_CONFIRM", column: "DRUG_SET_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_SET_SAFE_CONFIRM_ORG_ID", table: "T_PR_DRUG_SET_SAFE_CONFIRM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_SET_SPECIFY_DRUG_SET_ID", table: "T_PR_DRUG_SET_SPECIFY", column: "DRUG_SET_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_SET_SPECIFY_ORG_ID", table: "T_PR_DRUG_SET_SPECIFY", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_TYPE_ORG_ID", table: "T_PR_DRUG_TYPE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_TYPE_SAFE_CONFIRM_ORG_ID", table: "T_PR_DRUG_TYPE_SAFE_CONFIRM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_TYPE_SAFE_CONFIRM_TYPE_ID", table: "T_PR_DRUG_TYPE_SAFE_CONFIRM", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_CARRY_RECORD_ID", table: "T_PR_DRUG_USE_RECORD", column: "CARRY_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DEPARTMENT_ID", table: "T_PR_DRUG_USE_RECORD", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DRUG_SET_ID", table: "T_PR_DRUG_USE_RECORD", column: "DRUG_SET_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_ORG_ID", table: "T_PR_DRUG_USE_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_SPECIFY_ID", table: "T_PR_DRUG_USE_RECORD", column: "SPECIFY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_TYPE_ID", table: "T_PR_DRUG_USE_RECORD", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_USER_ID", table: "T_PR_DRUG_USE_RECORD", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_CONFIRM_ORG_ID", table: "T_PR_DRUG_USE_RECORD_CONFIRM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_CONFIRM_USE_RECORD_ID", table: "T_PR_DRUG_USE_RECORD_CONFIRM", column: "USE_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DETAIL_DRUG_SET_ID", table: "T_PR_DRUG_USE_RECORD_DETAIL", column: "DRUG_SET_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DETAIL_ORG_ID", table: "T_PR_DRUG_USE_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DETAIL_SPECIFY_ID", table: "T_PR_DRUG_USE_RECORD_DETAIL", column: "SPECIFY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DETAIL_TYPE_ID", table: "T_PR_DRUG_USE_RECORD_DETAIL", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DETAIL_USE_RECORD_ID", table: "T_PR_DRUG_USE_RECORD_DETAIL", column: "USE_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM_ORG_ID", table: "T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM_USE_RECORD_DETAIL_ID", table: "T_PR_DRUG_USE_RECORD_DETAIL_CONFIRM", column: "USE_RECORD_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_PRINT_DEPARTMENT_ID", table: "T_PR_DRUG_USE_RECORD_PRINT", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_PRINT_DRUG_SET_ID", table: "T_PR_DRUG_USE_RECORD_PRINT", column: "DRUG_SET_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_PRINT_ORG_ID", table: "T_PR_DRUG_USE_RECORD_PRINT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_PRINT_SPECIFY_ID", table: "T_PR_DRUG_USE_RECORD_PRINT", column: "SPECIFY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_PRINT_TYPE_ID", table: "T_PR_DRUG_USE_RECORD_PRINT", column: "TYPE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_PRINT_USE_RECORD_ID", table: "T_PR_DRUG_USE_RECORD_PRINT", column: "USE_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_PRINT_USER_ID", table: "T_PR_DRUG_USE_RECORD_PRINT", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_USER_ORG_ID", table: "T_PR_DRUG_USE_RECORD_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_USER_USE_RECORD_ID", table: "T_PR_DRUG_USE_RECORD_USER", column: "USE_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DRUG_USE_RECORD_USER_USER_ID", table: "T_PR_DRUG_USE_RECORD_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_ORG_ID", table: "T_PR_DUTY_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_DEAL_OPERATION_RECORD_ID", table: "T_PR_DUTY_OPERATION_RECORD_DEAL", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_DEAL_ORG_ID", table: "T_PR_DUTY_OPERATION_RECORD_DEAL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_DRUG_OPERATION_RECORD_ID", table: "T_PR_DUTY_OPERATION_RECORD_DRUG", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_DRUG_ORG_ID", table: "T_PR_DUTY_OPERATION_RECORD_DRUG", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_INVE_OPERATION_RECORD_ID", table: "T_PR_DUTY_OPERATION_RECORD_INVE", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_INVE_ORG_ID", table: "T_PR_DUTY_OPERATION_RECORD_INVE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_MACH_OPERATION_RECORD_ID", table: "T_PR_DUTY_OPERATION_RECORD_MACH", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_MACH_ORG_ID", table: "T_PR_DUTY_OPERATION_RECORD_MACH", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_TUNG_OPERATION_RECORD_ID", table: "T_PR_DUTY_OPERATION_RECORD_TUNG", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_DUTY_OPERATION_RECORD_TUNG_ORG_ID", table: "T_PR_DUTY_OPERATION_RECORD_TUNG", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXPERIMENTAL_OPERATION_RECORD_ORG_ID", table: "T_PR_EXPERIMENTAL_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL_OPERATION_RECORD_ID", table: "T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL_ORG_ID", table: "T_PR_EXPERIMENTAL_OPERATION_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_APPLICATION_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD", column: "APPLICATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_ORG_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE_EXTERNAL_ACCEPTANCE_RECORD_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE", column: "EXTERNAL_ACCEPTANCE_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE_IMG_FILE_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE_ORG_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_ACCEPTANCE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE_EXTERNAL_ACCEPTANCE_RECORD_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE", column: "EXTERNAL_ACCEPTANCE_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE_IMG_FILE_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE_ORG_ID", table: "T_PR_EXTERNAL_ACCEPTANCE_RECORD_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_DEPARTMENT_ID", table: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_EXTERNAL_COMPANY_ID", table: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION", column: "EXTERNAL_COMPANY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_MONITOR_ID", table: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION", column: "MONITOR_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_ORG_ID", table: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_EXTERNAL_ASSISTANCE_APPLICATION_USER_ID", table: "T_PR_EXTERNAL_ASSISTANCE_APPLICATION", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_ORG_ID", table: "T_PR_LABORATORY_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_DET_OPERATION_RECORD_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_DET", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_DET_ORG_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_DET", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_ORE_OPERATION_RECORD_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_ORE", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_ORE_ORG_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_ORE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_PRE_OPERATION_RECORD_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_PRE", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_PRE_ORG_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_PRE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_SAM_OPERATION_RECORD_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_SAM", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LABORATORY_OPERATION_RECORD_SAM_ORG_ID", table: "T_PR_LABORATORY_OPERATION_RECORD_SAM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_ORG_ID", table: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_USER_ID", table: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE_IMG_FILE_ID", table: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE_LANDSLIDE_ROLLSTONE_MONITOR_ID", table: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE", column: "LANDSLIDE_ROLLSTONE_MONITOR_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE_ORG_ID", table: "T_PR_LANDSLIDE_ROLLSTONE_MONITOR_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_MAP_PROCESS_RECORD_DEPARTMENT_ID", table: "T_PR_MAP_PROCESS_RECORD", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_MAP_PROCESS_RECORD_ORG_ID", table: "T_PR_MAP_PROCESS_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_MAP_PROCESS_RECORD_USER_ID", table: "T_PR_MAP_PROCESS_RECORD", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_MAP_PROCESS_RECORD_FILE_IMG_FILE_ID", table: "T_PR_MAP_PROCESS_RECORD_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_MAP_PROCESS_RECORD_FILE_MAP_PROCESS_RECORD_ID", table: "T_PR_MAP_PROCESS_RECORD_FILE", column: "MAP_PROCESS_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_MAP_PROCESS_RECORD_FILE_ORG_ID", table: "T_PR_MAP_PROCESS_RECORD_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PERFORM_TASK_SET_ORG_ID", table: "T_PR_PERFORM_TASK_SET", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_ORG_ID", table: "T_PR_POST_FORM_LINK", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_POST_ID", table: "T_PR_POST_FORM_LINK", column: "POST_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_CODE_ORG_ID", table: "T_PR_POST_FORM_LINK_CODE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_CODE_PF_FORM_ID", table: "T_PR_POST_FORM_LINK_CODE", column: "PF_FORM_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_CODE_POST_POST_ID", table: "T_PR_POST_FORM_LINK_CODE", column: "POST_POST_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_DEPARTMENT_DEPARTMENT_ID", table: "T_PR_POST_FORM_LINK_DEPARTMENT", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_DEPARTMENT_ORG_ID", table: "T_PR_POST_FORM_LINK_DEPARTMENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_DEPARTMENT_POST_POST_ID", table: "T_PR_POST_FORM_LINK_DEPARTMENT", column: "POST_POST_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_XK_DEPARTMENT_ID", table: "T_PR_POST_FORM_LINK_XK", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_XK_OPERATION_STEP_ID", table: "T_PR_POST_FORM_LINK_XK", column: "OPERATION_STEP_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_XK_ORG_ID", table: "T_PR_POST_FORM_LINK_XK", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_XK_POST_ID", table: "T_PR_POST_FORM_LINK_XK", column: "POST_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_XK_PARAM_ORG_ID", table: "T_PR_POST_FORM_LINK_XK_PARAM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_POST_FORM_LINK_XK_PARAM_POST_POST_ID", table: "T_PR_POST_FORM_LINK_XK_PARAM", column: "POST_POST_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PROCESS_FORM_XK_DEPARTMENT_ID", table: "T_PR_PROCESS_FORM_XK", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PROCESS_FORM_XK_OPERATION_STEP_ID", table: "T_PR_PROCESS_FORM_XK", column: "OPERATION_STEP_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PROCESS_FORM_XK_ORG_ID", table: "T_PR_PROCESS_FORM_XK", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PROCESS_FORM_XK_POST_ID", table: "T_PR_PROCESS_FORM_XK", column: "POST_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PROCESS_FORM_XK_DETAIL_ORG_ID", table: "T_PR_PROCESS_FORM_XK_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PROCESS_FORM_XK_DETAIL_POST_PROCESS_FORM_ID", table: "T_PR_PROCESS_FORM_XK_DETAIL", column: "POST_PROCESS_FORM_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_OPERATION_STEP_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD", column: "OPERATION_STEP_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_ORG_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_USER_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_FILE_IMG_FILE_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_FILE_ORG_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_FILE_PRODUCTION_OPERATION_RECORD_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD_FILE", column: "PRODUCTION_OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_USER_ORG_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_USER_PRODUCTION_OPERATION_RECORD_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD_USER", column: "PRODUCTION_OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_PRODUCTION_OPERATION_RECORD_USER_USER_ID", table: "T_PR_PRODUCTION_OPERATION_RECORD_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SANDPUMP_OPERATION_RECORD_ORG_ID", table: "T_PR_SANDPUMP_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SANDPUMP_OPERATION_RECORD_DETAIL_OPERATION_RECORD_ID", table: "T_PR_SANDPUMP_OPERATION_RECORD_DETAIL", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SANDPUMP_OPERATION_RECORD_DETAIL_ORG_ID", table: "T_PR_SANDPUMP_OPERATION_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_ORG_ID", table: "T_PR_SURVEY_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_DETAIL_ORG_ID", table: "T_PR_SURVEY_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_DETAIL_SURVEY_RECORD_ID", table: "T_PR_SURVEY_RECORD_DETAIL", column: "SURVEY_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_FILE_IMG_FILE_ID", table: "T_PR_SURVEY_RECORD_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_FILE_ORG_ID", table: "T_PR_SURVEY_RECORD_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_FILE_SURVEY_RECORD_ID", table: "T_PR_SURVEY_RECORD_FILE", column: "SURVEY_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_SET_ORG_ID", table: "T_PR_SURVEY_RECORD_SET", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_USER_ORG_ID", table: "T_PR_SURVEY_RECORD_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_USER_SURVEY_RECORD_ID", table: "T_PR_SURVEY_RECORD_USER", column: "SURVEY_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_SURVEY_RECORD_USER_USER_ID", table: "T_PR_SURVEY_RECORD_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_THOUSANDPUMP_OPERATION_RECORD_ORG_ID", table: "T_PR_THOUSANDPUMP_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL_OPERATION_RECORD_ID", table: "T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL_ORG_ID", table: "T_PR_THOUSANDPUMP_OPERATION_RECORD_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_ORG_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_DRUG_OPERATION_RECORD_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_DRUG", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_DRUG_ORG_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_DRUG", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_MEAS_OPERATION_RECORD_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_MEAS", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_MEAS_ORG_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_MEAS", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_SERI_OPERATION_RECORD_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_SERI", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_SERI_ORG_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_SERI", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_TARG_OPERATION_RECORD_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_TARG", column: "OPERATION_RECORD_ID"); migrationBuilder.CreateIndex( name: "IX_T_PR_TUNGPRE_OPERATION_RECORD_TARG_ORG_ID", table: "T_PR_TUNGPRE_OPERATION_RECORD_TARG", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ANNUAL_MONOTOR_SUMMARY_ORG_ID", table: "T_PT_ANNUAL_MONOTOR_SUMMARY", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_DEPARTMENT_ID", table: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_MONITOR_SUMMARY_ID", table: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", column: "MONITOR_SUMMARY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_ORG_ID", table: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_USER_ID", table: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT_MONOTOR_SUMMARY_DETAIL_ID", table: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT", column: "MONOTOR_SUMMARY_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT_ORG_ID", table: "T_PT_ANNUAL_MONOTOR_SUMMARY_DETAIL_CONTENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_DEPARTMENT_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_INDICATOR_FORMULATION_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT", column: "INDICATOR_FORMULATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_ORG_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_USER_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_ASSESSMENT_PLAN_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", column: "ASSESSMENT_PLAN_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_DEPARTMENT_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_ORG_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_USER_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT_ORG_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT_PLAN_AUDIT_DETAIL_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_DETAIL_CONTENT", column: "PLAN_AUDIT_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_FILE_ASSESSMENT_PLAN_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_FILE", column: "ASSESSMENT_PLAN_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_FILE_IMG_FILE_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_FILE_ORG_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_DEPARTMENT_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_ORG_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_USER_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT_ORG_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT_PLAN_AUDIT_DETAIL_ID", table: "T_PT_ASSESSMENT_PLAN_AUDIT_TEMP_DETAIL_CONTENT", column: "PLAN_AUDIT_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_COLLECT_REQUIREMENTS_ORG_ID", table: "T_PT_COLLECT_REQUIREMENTS", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_FILE_TYPE_ORG_ID", table: "T_PT_FILE_TYPE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_FORMULATE_REQUIREMENTS_ORG_ID", table: "T_PT_FORMULATE_REQUIREMENTS", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_GOALS_AND_TARGET_INDICATOR_FORMULATION_ID", table: "T_PT_GOALS_AND_TARGET", column: "INDICATOR_FORMULATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_GOALS_AND_TARGET_ORG_ID", table: "T_PT_GOALS_AND_TARGET", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_ID", table: "T_PT_INDICATOR_FORMULATION", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_ORG_ID", table: "T_PT_INDICATOR_FORMULATION", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_USER_ID", table: "T_PT_INDICATOR_FORMULATION", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DEPARTMENT_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_INDICATOR_FORMULATION_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", column: "INDICATOR_FORMULATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_USER_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_DEPARTMENT_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_INDICATOR_FORMULATION_DEPARTMENT_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", column: "INDICATOR_FORMULATION_DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT", column: "INDICATOR_FORMULATION_DEPARTMENT_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_DETAIL_CONTENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE_IMG_FILE_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE_INDICATOR_FORMULATION_DEPARTMENT_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE", column: "INDICATOR_FORMULATION_DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_INDICATOR_FORMULATION_DEPARTMENT_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", column: "INDICATOR_FORMULATION_DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_USER_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT", column: "INDICATOR_FORMULATION_DEPARTMENT_TEAM_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_DEPARTMENT_TEAM_CONTENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_FILE_IMG_FILE_ID", table: "T_PT_INDICATOR_FORMULATION_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_FILE_INDICATOR_FORMULATION_ID", table: "T_PT_INDICATOR_FORMULATION_FILE", column: "INDICATOR_FORMULATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_FILE_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_PLAN_FILE_IMG_FILE_ID", table: "T_PT_INDICATOR_FORMULATION_PLAN_FILE", column: "IMG_FILE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_PLAN_FILE_INDICATOR_FORMULATION_ID", table: "T_PT_INDICATOR_FORMULATION_PLAN_FILE", column: "INDICATOR_FORMULATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_PLAN_FILE_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_PLAN_FILE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES_INDICATOR_FORMULATION_ID", table: "T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES", column: "INDICATOR_FORMULATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES_RESOURCES_ID", table: "T_PT_INDICATOR_FORMULATION_PLAN_RESOURCES", column: "RESOURCES_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_REQUIREMENTS_FORMULATE_ID", table: "T_PT_INDICATOR_FORMULATION_REQUIREMENTS", column: "FORMULATE_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_REQUIREMENTS_INDICATOR_FORMULATION_ID", table: "T_PT_INDICATOR_FORMULATION_REQUIREMENTS", column: "INDICATOR_FORMULATION_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INDICATOR_FORMULATION_REQUIREMENTS_ORG_ID", table: "T_PT_INDICATOR_FORMULATION_REQUIREMENTS", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_INTENTIONAL_GUIDELINES_ORG_ID", table: "T_PT_INTENTIONAL_GUIDELINES", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_DEPARTMENT_ID", table: "T_PT_MONITOR_ASSESSMENT", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_ORG_ID", table: "T_PT_MONITOR_ASSESSMENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_USER_ID", table: "T_PT_MONITOR_ASSESSMENT", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_DETAIL_DEPARTMENT_ID", table: "T_PT_MONITOR_ASSESSMENT_DETAIL", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_DETAIL_MONITOR_ASSESSMENT_ID", table: "T_PT_MONITOR_ASSESSMENT_DETAIL", column: "MONITOR_ASSESSMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_DETAIL_ORG_ID", table: "T_PT_MONITOR_ASSESSMENT_DETAIL", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_DETAIL_USER_ID", table: "T_PT_MONITOR_ASSESSMENT_DETAIL", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT_MONITOR_ASSESSMENT_DETAIL_ID", table: "T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT", column: "MONITOR_ASSESSMENT_DETAIL_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT_ORG_ID", table: "T_PT_MONITOR_ASSESSMENT_DETAIL_CONTENT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_USER_MONITOR_ASSESSMENT_ID", table: "T_PT_MONITOR_ASSESSMENT_USER", column: "MONITOR_ASSESSMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_USER_ORG_ID", table: "T_PT_MONITOR_ASSESSMENT_USER", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_MONITOR_ASSESSMENT_USER_USER_ID", table: "T_PT_MONITOR_ASSESSMENT_USER", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_PLAN_RESOURCES_ORG_ID", table: "T_PT_PLAN_RESOURCES", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_DEPARTMENT_ID", table: "T_PT_SAFETY_POLICY_SURVEY", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_GUIDELINES_ID", table: "T_PT_SAFETY_POLICY_SURVEY", column: "GUIDELINES_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_ORG_ID", table: "T_PT_SAFETY_POLICY_SURVEY", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_USER_ID", table: "T_PT_SAFETY_POLICY_SURVEY", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_COLLECT_COLLECT_ID", table: "T_PT_SAFETY_POLICY_SURVEY_COLLECT", column: "COLLECT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_COLLECT_ORG_ID", table: "T_PT_SAFETY_POLICY_SURVEY_COLLECT", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_COLLECT_SAFETY_POLICY_ID", table: "T_PT_SAFETY_POLICY_SURVEY_COLLECT", column: "SAFETY_POLICY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_DEPARTMENT_ID", table: "T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_GUIDELINES_ID", table: "T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", column: "GUIDELINES_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_ORG_ID", table: "T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_SAFETY_POLICY_ID", table: "T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", column: "SAFETY_POLICY_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_FEEDBACK_USER_ID", table: "T_PT_SAFETY_POLICY_SURVEY_FEEDBACK", column: "USER_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_RANGE_DEPARTMENT_ID", table: "T_PT_SAFETY_POLICY_SURVEY_RANGE", column: "DEPARTMENT_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_RANGE_ORG_ID", table: "T_PT_SAFETY_POLICY_SURVEY_RANGE", column: "ORG_ID"); migrationBuilder.CreateIndex( name: "IX_T_PT_SAFETY_POLICY_SURVEY_RANGE_SAFETY_POLICY_ID", table: "T_PT_SAFETY_POLICY_SURVEY_RANGE", column: "SAFETY_POLICY_ID"); } } }