mh_sms/APT.Data.Migrations/Migrations/20240130031513_wjn202401-3001.cs
2024-01-30 11:19:22 +08:00

11089 lines
619 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wjn2024013001 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_T_CM_RSP_ESTIMATE_T_AE_ACCIDENT_EVENT_REPORT_EVENT_ID",
table: "T_CM_RSP_ESTIMATE");
migrationBuilder.DropForeignKey(
name: "FK_T_CM_RSP_ESTIMATE_T_AE_ACCIDENT_TYPE_ACCIDENT_TYPE_ID",
table: "T_CM_RSP_ESTIMATE");
migrationBuilder.DropForeignKey(
name: "FK_T_CM_RSP_ESTIMATE_EVENT_KIND_T_AE_ACCIDENT_KIND_KIND_ID",
table: "T_CM_RSP_ESTIMATE_EVENT_KIND");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_REPORT_FILE");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_FILE");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_PFILE");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_LEVEL_DAYS");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS");
migrationBuilder.DropTable(
name: "T_AE_DOSET_DEPARTMENT_USER");
migrationBuilder.DropTable(
name: "T_AE_INVESTIGATION_RECORD_ACC_FILES");
migrationBuilder.DropTable(
name: "T_AE_INVESTIGATION_RECORD_ASK_USERS");
migrationBuilder.DropTable(
name: "T_AE_INVESTIGATION_RECORD_CHART_FILES");
migrationBuilder.DropTable(
name: "T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS");
migrationBuilder.DropTable(
name: "T_AE_INVESTIGATION_RECORD_NOTES_FILES");
migrationBuilder.DropTable(
name: "T_DM_DETECTION_INSPECTION_RECORD_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_APPLY_DETAIL");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_CHECK_USER");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_INSPECTION_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_OVERHAUL_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_PURCHASE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_CHECK_DETAIL");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_CHECK_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_CHECK_TYPE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_CHECK_USER");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_ISSUE_DETAIL");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_MAINTENANCE_CHECK_USER");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_MAINTENANCE_PLAN_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_MAINTENANCE_PLAN_USER");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_MAINTENANCE_PPLAN_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_OVERHAUL_FILE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_REPAIR_FILE");
migrationBuilder.DropTable(
name: "T_OH_EXAM_NOTICE_OCC_HAZARD");
migrationBuilder.DropTable(
name: "T_OH_EXAM_RESULT_OCC_HAZARD");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_JOB_DETAIL");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_JOB_FILE");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_JOB_REPORT_FILE");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_RESULT");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EAXM_CYCLE_POST_MID");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_BATCH_DEPARTMENT");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_NOTICE_FILE");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_RESULT_IMPORT");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE");
migrationBuilder.DropTable(
name: "T_OH_RUNCONFIG");
migrationBuilder.DropTable(
name: "T_TI_INSURANCE_CLAIM_RECORD_FILE");
migrationBuilder.DropTable(
name: "T_TI_INSURANCE_RECORD_FILE");
migrationBuilder.DropTable(
name: "T_TI_INSURANCE_USER_RECORD");
migrationBuilder.DropTable(
name: "T_TI_PLAN_FILE");
migrationBuilder.DropTable(
name: "T_TI_PLAN_RANGE");
migrationBuilder.DropTable(
name: "T_TI_PLAN_SOURCE");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_CHECK_FILE");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_CHECK_WFFILE");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_FILE");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_MONEY_DETAIL_FILE");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_RANGE");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_SOURCE");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_WFFILE");
migrationBuilder.DropTable(
name: "T_TI_SAFE_PDT_COST_RECORD_FILE");
migrationBuilder.DropTable(
name: "T_TI_SAFE_PDT_COST_RECORD_TYPE");
migrationBuilder.DropTable(
name: "T_TL_BACK_DETAIL_USER");
migrationBuilder.DropTable(
name: "T_TL_BACK_FILE");
migrationBuilder.DropTable(
name: "T_TL_BACK_RECORD_USER");
migrationBuilder.DropTable(
name: "T_TL_BACK_REQUIRE");
migrationBuilder.DropTable(
name: "T_TL_CACULATE_FILE");
migrationBuilder.DropTable(
name: "T_TL_FILE_SUM_FILE");
migrationBuilder.DropTable(
name: "T_TL_HIGH_CHECK_FILE");
migrationBuilder.DropTable(
name: "T_TL_OUT_FILE");
migrationBuilder.DropTable(
name: "T_TL_PLAN_SET");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_FINISH_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_HIGHT_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_INTRODUCE_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_RECORD_CHECK_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_RECORD_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_RECORD_WATCH_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_SLOPEBANK_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_SLOPEBANK_PROJ_FILE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_SLOPEBANK_SUB_FILE");
migrationBuilder.DropTable(
name: "T_TL_QUALITY_CHECK_FILE");
migrationBuilder.DropTable(
name: "T_TL_WATCH_DAYLY_DETAIL_USER");
migrationBuilder.DropTable(
name: "T_TL_WATCH_LINE_DETAIL_USER");
migrationBuilder.DropTable(
name: "T_TL_WATCH_MOVE_DETAIL_USER");
migrationBuilder.DropTable(
name: "T_TL_WATCH_PERCENT_DETAIL_USER");
migrationBuilder.DropTable(
name: "T_TL_WATCH_PLAN_SET");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_KIND");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_REASON_TYPE");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_REASON");
migrationBuilder.DropTable(
name: "T_AE_INVESTIGATION_RECORD");
migrationBuilder.DropTable(
name: "T_DM_DETECTION_INSPECTION_RECORD");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_INSPECTION");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_OVERHAUL");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE_CHECK");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_CHECK");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_ISSUE");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_MAINTENANCE_CHECK");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_MAINTENANCE_PLAN");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_OVERHAUL");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_JOB");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_JOB_REPORT");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_RESULT_SUM");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_RULE");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_PLAN_REGISTER");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE");
migrationBuilder.DropTable(
name: "T_TI_INSURANCE_CLAIM_RECORD");
migrationBuilder.DropTable(
name: "T_TI_INSURANCE_RECORD");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_CHECK");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_MONEY_DETAIL");
migrationBuilder.DropTable(
name: "T_TI_PLAN_RANGE_TYPE");
migrationBuilder.DropTable(
name: "T_TI_PLAN_SOURCE_TYPE");
migrationBuilder.DropTable(
name: "T_TI_COST_TYPE");
migrationBuilder.DropTable(
name: "T_TI_SAFE_PDT_COST_RECORD");
migrationBuilder.DropTable(
name: "T_TL_BACK_DETAIL");
migrationBuilder.DropTable(
name: "T_TL_BACK_RECORD");
migrationBuilder.DropTable(
name: "T_TL_REQUIRE");
migrationBuilder.DropTable(
name: "T_TL_CACULATE");
migrationBuilder.DropTable(
name: "T_TL_FILE_SUM");
migrationBuilder.DropTable(
name: "T_TL_HIGH_CHECK");
migrationBuilder.DropTable(
name: "T_TL_OUT");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_FINISH");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_HIGHT");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_INTRODUCE");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_RECORD");
migrationBuilder.DropTable(
name: "T_TL_PROJECT_SLOPEBANK");
migrationBuilder.DropTable(
name: "T_TL_QUALITY_CHECK");
migrationBuilder.DropTable(
name: "T_TL_WATCH_DAYLY_DETAIL");
migrationBuilder.DropTable(
name: "T_TL_WATCH_LINE_DETAIL");
migrationBuilder.DropTable(
name: "T_TL_WATCH_MOVE_DETAIL");
migrationBuilder.DropTable(
name: "T_TL_WATCH_PERCENT_DETAIL");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_APPLY");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_REPAIR");
migrationBuilder.DropTable(
name: "T_OH_HAZARD_MONITOR_TYPE");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EAXM_PLAN_DEPARTMENT");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_OCC_DISEASE");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_RESULT");
migrationBuilder.DropTable(
name: "T_TI_PROJECT_MONEY");
migrationBuilder.DropTable(
name: "T_TL_BACK");
migrationBuilder.DropTable(
name: "T_TL_WATCH_DAYLY");
migrationBuilder.DropTable(
name: "T_TL_WATCH_LINE");
migrationBuilder.DropTable(
name: "T_TL_WATCH_LINE_POINT");
migrationBuilder.DropTable(
name: "T_TL_WATCH_MOVE");
migrationBuilder.DropTable(
name: "T_TL_WATCH_MOVE_POINT");
migrationBuilder.DropTable(
name: "T_TL_WATCH_PERCENT");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_EVENT_REPORT");
migrationBuilder.DropTable(
name: "T_DM_DEVICE_BASE");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_PLAN");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_NOTICE_REGISTER");
migrationBuilder.DropTable(
name: "T_TI_PROJECT");
migrationBuilder.DropTable(
name: "T_TL_WATCH_SUM");
migrationBuilder.DropTable(
name: "T_AE_ACCIDENT_TYPE");
migrationBuilder.DropTable(
name: "T_DM_CATEGORY");
migrationBuilder.DropTable(
name: "T_DM_TYPE");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_CYCLE");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_NOTICE");
migrationBuilder.DropTable(
name: "T_TI_PLAN");
migrationBuilder.DropTable(
name: "T_TL_TAILING");
migrationBuilder.DropTable(
name: "T_OH_HEALTH_EXAM_BATCH");
migrationBuilder.DropIndex(
name: "IX_T_CM_RSP_ESTIMATE_EVENT_KIND_KIND_ID",
table: "T_CM_RSP_ESTIMATE_EVENT_KIND");
migrationBuilder.DropIndex(
name: "IX_T_CM_RSP_ESTIMATE_ACCIDENT_TYPE_ID",
table: "T_CM_RSP_ESTIMATE");
migrationBuilder.DropIndex(
name: "IX_T_CM_RSP_ESTIMATE_EVENT_ID",
table: "T_CM_RSP_ESTIMATE");
migrationBuilder.DropColumn(
name: "KIND_ID",
table: "T_CM_RSP_ESTIMATE_EVENT_KIND");
migrationBuilder.DropColumn(
name: "ACCIDENT_TYPE_ID",
table: "T_CM_RSP_ESTIMATE");
migrationBuilder.DropColumn(
name: "EVENT_ID",
table: "T_CM_RSP_ESTIMATE");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "KIND_ID",
table: "T_CM_RSP_ESTIMATE_EVENT_KIND",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "ACCIDENT_TYPE_ID",
table: "T_CM_RSP_ESTIMATE",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "EVENT_ID",
table: "T_CM_RSP_ESTIMATE",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_REASON_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CATEGORY = table.Column<int>(type: "int", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_REASON_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REASON_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_KIND",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_KIND", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_KIND_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_LEVEL_DAYS",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ACCIDENT_LEVEL = table.Column<int>(type: "int", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DAYS = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_LEVEL_DAYS", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_LEVEL_DAYS_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_DOSET_DEPARTMENT_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EVENTTYPE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_DOSET_DEPARTMENT_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_DOSET_DEPARTMENT_USER_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_DOSET_DEPARTMENT_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_AE_DOSET_DEPARTMENT_USER_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_DM_CATEGORY",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_CATEGORY", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_CATEGORY_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_APPLY",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_APPLY", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_APPLY_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_APPLY_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_APPLY_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_CHECK_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_CHECK_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_MAINTENANCE_CHECK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CHECKDATETIME = table.Column<DateTime>(type: "datetime2", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS_APPROVE = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_MAINTENANCE_CHECK", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HAZARD_MONITOR_JOB_REPORT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BEGINTIME_MONITOR = table.Column<DateTime>(type: "datetime2", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENTNAME_JOB = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENDTIME_MONITOR = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
YEAR = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_JOB_REPORT", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_REPORT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_REPORT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_REPORT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HAZARD_MONITOR_RESULT_SUM",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RATIO = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
YEAR = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_RESULT_SUM", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RESULT_SUM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HAZARD_MONITOR_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONITOR_TYPE = table.Column<int>(type: "int", maxLength: 200, nullable: false),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SMALL_TYPE = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_BATCH",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BATCH = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
END_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LOCATION = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
START_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_BATCH", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_BATCH_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_BATCH_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_CYCLE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HEALTH_EXAM_CONTENT = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
HEALTH_EXAM_CYCLE = table.Column<int>(type: "int", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_CYCLE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_CYCLE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_OCC_DISEASE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_OCC_DISEASE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_OCC_DISEASE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_PLAN",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CONTENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DUE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATAUSORDER = table.Column<int>(type: "int", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
YEAR = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_PLAN", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_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_OH_HEALTH_EXAM_PLAN_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_RUNCONFIG",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CONFIGTYPE = table.Column<int>(type: "int", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISONLY = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LASTRUNDATE = table.Column<DateTime>(type: "datetime2", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_RUNCONFIG", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_RUNCONFIG_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_RUNCONFIG_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_TI_COST_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_COST_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_COST_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_INSURANCE_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TYPE = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_INSURANCE_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_INSURANCE_RECORD_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PLAN",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BEGINTIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
YEAR = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PLAN", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_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_TI_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_TI_PLAN_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PLAN_RANGE_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PLAN_RANGE_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PLAN_RANGE_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PLAN_SOURCE_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PLAN_SOURCE_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PLAN_SOURCE_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_SAFE_PDT_COST_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
COUNT = table.Column<int>(type: "int", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
PURPOSE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
UNIT = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USETIME = table.Column<DateTime>(type: "datetime2", nullable: true),
USE_AMOUNT = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_SAFE_PDT_COST_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_SAFE_PDT_COST_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_TI_SAFE_PDT_COST_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_TI_SAFE_PDT_COST_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_TI_SAFE_PDT_COST_RECORD_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PLAN_SET",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATA = table.Column<int>(type: "int", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENABLE_STATUS = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLANCHECKFREQUENCY = table.Column<int>(type: "int", nullable: false),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RUNDATA = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RUNSETTIME = table.Column<DateTime>(type: "datetime2", nullable: false),
WEEKDATA = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PLAN_SET", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PLAN_SET_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PLAN_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_TL_PLAN_SET_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_TL_REQUIRE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENABLE_STATUS = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_REQUIRE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_REQUIRE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_TAILING",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LOCATION = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATE = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_TAILING", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_TAILING_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_REPORT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ACCIDENT_LEVEL = table.Column<int>(type: "int", nullable: true),
ACCIDENT_PLACE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ACCIDENT_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ACCIDENT_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ACCIDENT_TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ECONOMIC_LOSSES = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
ESTIMATE_CASUALTY_COUNT = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMPACT_SCOPE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REMARK = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
RSP_LEVEL = table.Column<int>(type: "int", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TAKE_MEASURES = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
WORK_SUGGEST = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_REPORT", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_T_AE_ACCIDENT_TYPE_ACCIDENT_TYPE_ID",
column: x => x.ACCIDENT_TYPE_ID,
principalTable: "T_AE_ACCIDENT_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_ISSUE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPLY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_ISSUE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_ISSUE_T_DM_DEVICE_APPLY_APPLY_ID",
column: x => x.APPLY_ID,
principalTable: "T_DM_DEVICE_APPLY",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_ISSUE_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_ISSUE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_ISSUE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_MAINTENANCE_CHECK_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECKTIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
ISMAIN = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_MAINTENANCE_CHECK_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_USER_T_DM_DEVICE_MAINTENANCE_CHECK_CHECK_ID",
column: x => x.CHECK_ID,
principalTable: "T_DM_DEVICE_MAINTENANCE_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_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_DM_DEVICE_MAINTENANCE_CHECK_USER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_BASE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CATEGORY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEVICE_TYPE = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
IS_EMERGENCY = table.Column<bool>(type: "bit", nullable: false),
IS_SEND = table.Column<int>(type: "int", nullable: false),
MACHINE_CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PARAMETER = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
POSITION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
PURPOSE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
QTY = table.Column<int>(type: "int", nullable: false),
SPEC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
TPM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UNIT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_T_DM_CATEGORY_CATEGORY_ID",
column: x => x.CATEGORY_ID,
principalTable: "T_DM_CATEGORY",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_T_DM_TYPE_TYPE_ID",
column: x => x.TYPE_ID,
principalTable: "T_DM_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HAZARD_MONITOR_JOB_REPORT_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REPORT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_JOB_REPORT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_REPORT_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_OH_HAZARD_MONITOR_JOB_REPORT_FILE_T_OH_HAZARD_MONITOR_JOB_REPORT_REPORT_ID",
column: x => x.REPORT_ID,
principalTable: "T_OH_HAZARD_MONITOR_JOB_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_REPORT_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_OH_HAZARD_MONITOR_JOB",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEVICE_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
DEVICE_SPEC = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONITOR_METHOD = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
MONITOR_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONITOR_TYPE = table.Column<int>(type: "int", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SAMPLE_PEOPLE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_ID_GET = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_JOB", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_T_OH_HAZARD_MONITOR_TYPE_TYPE_ID",
column: x => x.TYPE_ID,
principalTable: "T_OH_HAZARD_MONITOR_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HAZARD_MONITOR_RULE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DAY = table.Column<int>(type: "int", nullable: false),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEPARTMENT_ID_WARN = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEPARTMENT_ID_WORKSHOP = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LAST_NOTIFY = table.Column<DateTime>(type: "datetime2", nullable: true),
LOCATION = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONITOR_INTERVAL = table.Column<int>(type: "int", nullable: false),
MONTH = table.Column<int>(type: "int", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
THRESHOLD_DUST = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
THRESHOLD_NOISE = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
THRESHOLD_RADIATION_05 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
THRESHOLD_RADIATION_10 = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
THRESHOLD_RADIATION_AROUND = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
THRESHOLD_WARTER_HIGH = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
THRESHOLD_WARTER_LOW = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
WARN_POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
WEEKDATA = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_RULE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RULE_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RULE_T_FM_DEPARTMENT_DEPARTMENT_ID_WARN",
column: x => x.DEPARTMENT_ID_WARN,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RULE_T_FM_DEPARTMENT_DEPARTMENT_ID_WORKSHOP",
column: x => x.DEPARTMENT_ID_WORKSHOP,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RULE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RULE_T_FM_USER_POST_RECORD_POST_ID",
column: x => x.RECORD_POST_ID,
principalTable: "T_FM_USER_POST",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RULE_T_FM_USER_POST_WARN_POST_ID",
column: x => x.WARN_POST_ID,
principalTable: "T_FM_USER_POST",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RULE_T_OH_HAZARD_MONITOR_TYPE_TYPE_ID",
column: x => x.TYPE_ID,
principalTable: "T_OH_HAZARD_MONITOR_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_BATCH_DEPARTMENT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BATCH_ID = table.Column<Guid>(type: "uniqueidentifier", maxLength: 200, nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_BATCH_DEPARTMENT", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_BATCH_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_OH_HEALTH_EXAM_BATCH_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_OH_HEALTH_EXAM_BATCH_DEPARTMENT_T_OH_HEALTH_EXAM_BATCH_BATCH_ID",
column: x => x.BATCH_ID,
principalTable: "T_OH_HEALTH_EXAM_BATCH",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_NOTICE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
END_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXAM_BATCH_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISSYSTEM = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
NOTICEIMPORTSTATE = table.Column<int>(type: "int", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OTHER_STUFF = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
PARENTID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_NOTICE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_T_OH_HEALTH_EXAM_BATCH_EXAM_BATCH_ID",
column: x => x.EXAM_BATCH_ID,
principalTable: "T_OH_HEALTH_EXAM_BATCH",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HAZARD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID_T_HM_IDENTIFYING_HAZARD_ID",
column: x => x.HAZARD_ID,
principalTable: "T_HM_IDENTIFYING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID_T_OH_HEALTH_EXAM_CYCLE_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_OH_HEALTH_EXAM_CYCLE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EAXM_CYCLE_POST_MID",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SC_POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EAXM_CYCLE_POST_MID", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EAXM_CYCLE_POST_MID_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EAXM_CYCLE_POST_MID_T_OH_HEALTH_EXAM_CYCLE_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_OH_HEALTH_EXAM_CYCLE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EAXM_CYCLE_POST_MID_T_SC_POST_SC_POST_ID",
column: x => x.SC_POST_ID,
principalTable: "T_SC_POST",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXAM_CYCLE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_T_OH_HEALTH_EXAM_CYCLE_EXAM_CYCLE_ID",
column: x => x.EXAM_CYCLE_ID,
principalTable: "T_OH_HEALTH_EXAM_CYCLE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EAXM_PLAN_DEPARTMENT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCONTENTMASTER = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EAXM_PLAN_DEPARTMENT", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EAXM_PLAN_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_OH_HEALTH_EAXM_PLAN_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_OH_HEALTH_EAXM_PLAN_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_OH_HEALTH_EAXM_PLAN_DEPARTMENT_T_OH_HEALTH_EXAM_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_OH_HEALTH_EXAM_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_INSURANCE_RECORD_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_INSURANCE_RECORD_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_INSURANCE_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_TI_INSURANCE_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_TI_INSURANCE_RECORD_FILE_T_TI_INSURANCE_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_TI_INSURANCE_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_INSURANCE_USER_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENTNAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
INSURE_DURATION = table.Column<int>(type: "int", nullable: true),
INSURE_STATUS = table.Column<int>(type: "int", nullable: true),
INSURE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
OPERATEYEARMON = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ROW_NO = table.Column<int>(type: "int", nullable: false),
STOP_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
TYPE = table.Column<int>(type: "int", nullable: true),
USERPOSTNAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_INSURANCE_USER_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_INSURANCE_USER_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_TI_INSURANCE_USER_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_TI_INSURANCE_USER_RECORD_T_TI_INSURANCE_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_TI_INSURANCE_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PLAN_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PLAN_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_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_TI_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_TI_PLAN_FILE_T_TI_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_TI_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BEGINTIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
ISMONEY = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
IS_FOREIGN = table.Column<bool>(type: "bit", nullable: true),
MANAGER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONEY = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
YEAR = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_T_FM_USER_MANAGER_ID",
column: x => x.MANAGER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_T_TI_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_TI_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PLAN_RANGE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RANGE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PLAN_RANGE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PLAN_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_TI_PLAN_RANGE_T_TI_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_TI_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PLAN_RANGE_T_TI_PLAN_RANGE_TYPE_RANGE_ID",
column: x => x.RANGE_ID,
principalTable: "T_TI_PLAN_RANGE_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PLAN_SOURCE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SOURCE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PLAN_SOURCE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PLAN_SOURCE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PLAN_SOURCE_T_TI_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_TI_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PLAN_SOURCE_T_TI_PLAN_SOURCE_TYPE_SOURCE_ID",
column: x => x.SOURCE_ID,
principalTable: "T_TI_PLAN_SOURCE_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_SAFE_PDT_COST_RECORD_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_SAFE_PDT_COST_RECORD_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_SAFE_PDT_COST_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_TI_SAFE_PDT_COST_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_TI_SAFE_PDT_COST_RECORD_FILE_T_TI_SAFE_PDT_COST_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_TI_SAFE_PDT_COST_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_SAFE_PDT_COST_RECORD_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
COST_TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_SAFE_PDT_COST_RECORD_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_SAFE_PDT_COST_RECORD_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_TI_SAFE_PDT_COST_RECORD_TYPE_T_TI_COST_TYPE_COST_TYPE_ID",
column: x => x.COST_TYPE_ID,
principalTable: "T_TI_COST_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_SAFE_PDT_COST_RECORD_TYPE_T_TI_SAFE_PDT_COST_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_TI_SAFE_PDT_COST_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_BACK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
BACKDATE = table.Column<DateTime>(type: "datetime2", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISEND = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_BACK", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_BACK_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_BACK_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
BACKTIME = table.Column<DateTime>(type: "datetime2", nullable: true),
BACKTIMEEND = table.Column<DateTime>(type: "datetime2", nullable: true),
BACK_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
BACK_DIREACT = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
BACK_NUMBER = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
BACK_ORDER = table.Column<int>(type: "int", nullable: true),
BACK_SCALE = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
BACK_THICKNESS = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DRIVE_LONG = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SAFE_HIGHT = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_BACK_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_BACK_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_TL_BACK_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_TL_BACK_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_TL_BACK_RECORD_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_RECORD_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_CACULATE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_CACULATE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_CACULATE_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_CACULATE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_CACULATE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_CACULATE_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_FILE_SUM",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CONTENT = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FILETYPE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TASK_PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_FILE_SUM", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_FILE_SUM_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_FILE_SUM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_FILE_SUM_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_FILE_SUM_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_HIGH_CHECK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_HIGH_CHECK", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_HIGH_CHECK_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_HIGH_CHECK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_HIGH_CHECK_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_HIGH_CHECK_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_OUT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OUTDATE = table.Column<DateTime>(type: "datetime2", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_OUT", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_OUT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_OUT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_OUT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_OUT_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_FINISH",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT = table.Column<int>(type: "int", nullable: true),
RESULT_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_FINISH", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_FINISH_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_FINISH_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_FINISH_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_FINISH_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_HIGHT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT = table.Column<int>(type: "int", nullable: true),
RESULT_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_HIGHT", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_HIGHT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_HIGHT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_HIGHT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_HIGHT_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_INTRODUCE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_INTRODUCE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_INTRODUCE_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_INTRODUCE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_INTRODUCE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_INTRODUCE_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT = table.Column<int>(type: "int", nullable: true),
RESULT_CHECK = table.Column<int>(type: "int", nullable: true),
RESULT_CHECK_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RESULT_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RESULT_WATCH = table.Column<int>(type: "int", nullable: true),
RESULT_WATCH_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_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_TL_PROJECT_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_TL_PROJECT_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_TL_PROJECT_RECORD_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_SLOPEBANK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
COUNTNUM = table.Column<int>(type: "int", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAMESUB = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT = table.Column<int>(type: "int", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_SLOPEBANK", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_SLOPEBANK_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_SLOPEBANK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_SLOPEBANK_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_PROJECT_SLOPEBANK_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_QUALITY_CHECK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_QUALITY_CHECK", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_QUALITY_CHECK_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_QUALITY_CHECK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_QUALITY_CHECK_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_QUALITY_CHECK_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_LINE_POINT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENABLE_STATUS = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LOCATION = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POINT_DEEP = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
POINT_NO = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_LINE_POINT", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_POINT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_POINT_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_MOVE_POINT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENABLE_STATUS = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME_BASE = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
NAME_WATCH = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POINT_BASE = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_MOVE_POINT", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_POINT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_POINT_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_PLAN_SET",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATA = table.Column<int>(type: "int", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENABLE_STATUS = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLANCHECKFREQUENCY = table.Column<int>(type: "int", nullable: false),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RUNDATA = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RUNSETTIME = table.Column<DateTime>(type: "datetime2", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
WATCHTYPE = table.Column<int>(type: "int", nullable: false),
WEEKDATA = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_PLAN_SET", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_PLAN_SET_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_PLAN_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_TL_WATCH_PLAN_SET_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_TL_WATCH_PLAN_SET_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_SUM",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_SUM", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_SUM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_SUM_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_REPORT_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REPORT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_REPORT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_FILE_T_AE_ACCIDENT_EVENT_REPORT_REPORT_ID",
column: x => x.REPORT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_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_AE_ACCIDENT_EVENT_REPORT_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_AE_ACCIDENT_EVENT_REPORT_LIST_KIND",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
KIND_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REPORT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND_T_AE_ACCIDENT_EVENT_REPORT_REPORT_ID",
column: x => x.REPORT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND_T_AE_ACCIDENT_KIND_KIND_ID",
column: x => x.KIND_ID,
principalTable: "T_AE_ACCIDENT_KIND",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ACCIDENT_COURSE = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CASUALTY_COUNT = table.Column<int>(type: "int", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ECONOMIC_LOSSES = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REPORT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
RISK_SUBMIT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SYSTEMMAXTIME = table.Column<DateTime>(type: "datetime2", nullable: true),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_RESULT", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_T_AE_ACCIDENT_EVENT_REPORT_REPORT_ID",
column: x => x.REPORT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_T_BS_RISK_SUBMIT_RISK_SUBMIT_ID",
column: x => x.RISK_SUBMIT_ID,
principalTable: "T_BS_RISK_SUBMIT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LEADER_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REPORT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SURVEY_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_T_AE_ACCIDENT_EVENT_REPORT_REPORT_ID",
column: x => x.REPORT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_T_FM_USER_LEADER_USER_ID",
column: x => x.LEADER_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_T_FM_USER_SURVEY_USER_ID",
column: x => x.SURVEY_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_INSURANCE_CLAIM_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ACCIDENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DISABILITY_AFFIRM_AGENCY = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
DISABILITY_AFFIRM_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DISABILITY_LEVEL = table.Column<int>(type: "int", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HOSPITAL = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
INJURE_AFFIRM_AGENCY = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
INJURE_AFFIRM_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
INJURE_DETAIL = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
INJURE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
INSURANCE_CLAIM_AMOUNT = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
IN_HOSPITAL = table.Column<int>(type: "int", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REMARK = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_CLAIM_AMOUNT = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_INSURANCE_CLAIM_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_INSURANCE_CLAIM_RECORD_T_AE_ACCIDENT_EVENT_REPORT_ACCIDENT_ID",
column: x => x.ACCIDENT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_INSURANCE_CLAIM_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_TI_INSURANCE_CLAIM_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_TI_INSURANCE_CLAIM_RECORD_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DETECTION_INSPECTION_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MACHINE_CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MECHANISM = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POSITION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
QUALIFICATION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RESULT = table.Column<int>(type: "int", nullable: false),
SPEC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DETECTION_INSPECTION_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DETECTION_INSPECTION_RECORD_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DETECTION_INSPECTION_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_DM_DETECTION_INSPECTION_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_DM_DETECTION_INSPECTION_RECORD_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_APPLY_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DAY = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DEVICE_APPLY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NUM = table.Column<int>(type: "int", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
QTY = table.Column<int>(type: "int", nullable: false),
RETURN_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
SPEC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
UNIT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
USE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_APPLY_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_APPLY_DETAIL_T_DM_DEVICE_APPLY_DEVICE_APPLY_ID",
column: x => x.DEVICE_APPLY_ID,
principalTable: "T_DM_DEVICE_APPLY",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_APPLY_DETAIL_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_APPLY_DETAIL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_BASE_CHECK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECKTIME = table.Column<DateTime>(type: "datetime2", nullable: false),
CHECKTYPE = table.Column<int>(type: "int", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATA = table.Column<int>(type: "int", nullable: true),
DEVICEBASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
ITEM1 = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ITEM2 = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ITEM3 = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLANCHECKFREQUENCY = table.Column<int>(type: "int", nullable: true),
ROW_NO = table.Column<int>(type: "int", nullable: false),
RUNDATA = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
T_DM_DEVICE_BASEID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
WEEKDATA = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_CHECK", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_CHECK_T_DM_DEVICE_BASE_DEVICEBASE_ID",
column: x => x.DEVICEBASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_CHECK_T_DM_DEVICE_BASE_T_DM_DEVICE_BASEID",
column: x => x.T_DM_DEVICE_BASEID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_CHECK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_BASE_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_FILE_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_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_DM_DEVICE_BASE_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_DM_DEVICE_BASE_INSPECTION",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CYCLE = table.Column<int>(type: "int", nullable: false),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MECHANISM = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT = table.Column<int>(type: "int", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_INSPECTION", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_INSPECTION_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_INSPECTION_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_INSPECTION_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_INSPECTION_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_BASE_OVERHAUL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXTERNAL_SUPPORT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MALFUCTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OVERHAUL_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_OVERHAUL", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_OVERHAUL_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_OVERHAUL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_OVERHAUL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_BASE_PURCHASE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ACCEPT_DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MANUFACTURER = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MANUFACTURE_DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PURCHASE_DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
SERVICE_LIFE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
SUPPLIER = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
TPM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_PURCHASE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_PURCHASE_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_PURCHASE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_CHECK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECKTYPE = table.Column<int>(type: "int", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEVICEBASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
END_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MACHINE_CODE = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
MACHINE_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLANID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
POSITION_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
RECORD_DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
SCHEDULIN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SPEC = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
START_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TEAM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TEAM_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_CHECK", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_T_DM_DEVICE_BASE_DEVICEBASE_ID",
column: x => x.DEVICEBASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_T_FM_DEPARTMENT_SCHEDULING_SCHEDULIN_ID",
column: x => x.SCHEDULIN_ID,
principalTable: "T_FM_DEPARTMENT_SCHEDULING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_ISSUE_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEAL_STATUS = table.Column<int>(type: "int", nullable: false),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DEVICE_ISSUE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NUM = table.Column<int>(type: "int", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
QTY = table.Column<int>(type: "int", nullable: false),
RETURN_STATUS = table.Column<int>(type: "int", nullable: false),
RETURN_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
SPEC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
UNIT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_ISSUE_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_ISSUE_DETAIL_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_ISSUE_DETAIL_T_DM_DEVICE_ISSUE_DEVICE_ISSUE_ID",
column: x => x.DEVICE_ISSUE_ID,
principalTable: "T_DM_DEVICE_ISSUE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_ISSUE_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_DM_DEVICE_ISSUE_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_DM_DEVICE_ISSUE_DETAIL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_MAINTENANCE_PLAN",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CATEGORY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CONTENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
COUNT = table.Column<int>(type: "int", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATA = table.Column<int>(type: "int", nullable: true),
DEVICEBASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENABLE_STATUS = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MACHINE_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLANCHECKFREQUENCY = table.Column<int>(type: "int", nullable: false),
POSITION = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
RUNDATA = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RUNSETTIME = table.Column<DateTime>(type: "datetime2", nullable: false),
SPEC = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
STATUS_APPROVE = table.Column<int>(type: "int", nullable: false),
WEEKDATA = table.Column<int>(type: "int", nullable: true),
YEARPLAN = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_MAINTENANCE_PLAN", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_PLAN_T_DM_CATEGORY_CATEGORY_ID",
column: x => x.CATEGORY_ID,
principalTable: "T_DM_CATEGORY",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_PLAN_T_DM_DEVICE_BASE_DEVICEBASE_ID",
column: x => x.DEVICEBASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_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_DM_DEVICE_MAINTENANCE_PLAN_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_REPAIR",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CODE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DESCRPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EMERGENCY_LEVEL_NAME = table.Column<int>(type: "int", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
IS_HELP = table.Column<bool>(type: "bit", nullable: false),
MACHINE_CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MACHINE_NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POSITION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
REPAIR_CHARGE_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
REPAIR_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
REPAIR_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SPEC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_REPAIR", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_REPAIR_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_REPAIR_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_REPAIR_T_FM_USER_REPAIR_CHARGE_USER_ID",
column: x => x.REPAIR_CHARGE_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_REPAIR_T_FM_USER_REPAIR_USER_ID",
column: x => x.REPAIR_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_REPAIR_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HAZARD_MONITOR_JOB_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_JOB_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_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_OH_HAZARD_MONITOR_JOB_FILE_T_OH_HAZARD_MONITOR_JOB_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_OH_HAZARD_MONITOR_JOB",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_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_OH_HAZARD_MONITOR_JOB_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
JOB_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
JOB_STATUS = table.Column<int>(type: "int", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONITOR_RESULT = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
MONITOR_RESULT_05 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
MONITOR_RESULT_10 = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
MONITOR_RESULT_AROUND = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
MONITOR_RESULT_HIGH = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
MONITOR_RESULT_LOW = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OVER_LIMIT = table.Column<int>(type: "int", nullable: true),
PROTECT_STATUS = table.Column<int>(type: "int", nullable: true),
RULE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SAMPLE_SOURCE = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
SAMPLE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
TESTER = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
TEST_DEPARTMENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
TEST_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
USER_ID_GET = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_JOB_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_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_OH_HAZARD_MONITOR_JOB_DETAIL_T_OH_HAZARD_MONITOR_JOB_JOB_ID",
column: x => x.JOB_ID,
principalTable: "T_OH_HAZARD_MONITOR_JOB",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_JOB_DETAIL_T_OH_HAZARD_MONITOR_RULE_RULE_ID",
column: x => x.RULE_ID,
principalTable: "T_OH_HAZARD_MONITOR_RULE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HAZARD_MONITOR_RESULT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONITOR_COUNT = table.Column<int>(type: "int", nullable: false),
OK_COUNT = table.Column<int>(type: "int", nullable: false),
OK_PERCENT = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RULE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TREND = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
User_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HAZARD_MONITOR_RESULT", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RESULT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RESULT_T_OH_HAZARD_MONITOR_RESULT_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_OH_HAZARD_MONITOR_RESULT_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HAZARD_MONITOR_RESULT_T_OH_HAZARD_MONITOR_RULE_RULE_ID",
column: x => x.RULE_ID,
principalTable: "T_OH_HAZARD_MONITOR_RULE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_NOTICE_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NOTICE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_NOTICE_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_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_OH_HEALTH_EXAM_NOTICE_FILE_T_OH_HEALTH_EXAM_NOTICE_NOTICE_ID",
column: x => x.NOTICE_ID,
principalTable: "T_OH_HEALTH_EXAM_NOTICE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_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_OH_HEALTH_EXAM_NOTICE_REGISTER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CYCLE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEPARTMENT_ID_WORKSHOP = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXAM_BATCH_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LASTDATE = table.Column<DateTime>(type: "datetime2", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NEXTDATE = table.Column<DateTime>(type: "datetime2", nullable: true),
NOTICE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID_DEP = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PLAN_REGISTER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
THISDATE = table.Column<DateTime>(type: "datetime2", nullable: true),
TYPE = table.Column<int>(type: "int", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_NOTICE_REGISTER", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_REGISTER_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_REGISTER_T_FM_DEPARTMENT_DEPARTMENT_ID_WORKSHOP",
column: x => x.DEPARTMENT_ID_WORKSHOP,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_REGISTER_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_REGISTER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_REGISTER_T_OH_HEALTH_EXAM_BATCH_EXAM_BATCH_ID",
column: x => x.EXAM_BATCH_ID,
principalTable: "T_OH_HEALTH_EXAM_BATCH",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_REGISTER_T_OH_HEALTH_EXAM_CYCLE_CYCLE_ID",
column: x => x.CYCLE_ID,
principalTable: "T_OH_HEALTH_EXAM_CYCLE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_NOTICE_REGISTER_T_OH_HEALTH_EXAM_NOTICE_NOTICE_ID",
column: x => x.NOTICE_ID,
principalTable: "T_OH_HEALTH_EXAM_NOTICE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_RESULT_IMPORT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NOTICE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_RESULT_IMPORT", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_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_OH_HEALTH_EXAM_RESULT_IMPORT_T_OH_HEALTH_EXAM_NOTICE_NOTICE_ID",
column: x => x.NOTICE_ID,
principalTable: "T_OH_HEALTH_EXAM_NOTICE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENTINFO_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST_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_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_DEPARTMENTINFO_ID",
column: x => x.DEPARTMENTINFO_ID,
principalTable: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEPARTMENT_ID_WORKSHOP = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXAM_CYCLE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HEALTH_EXAM_CONTENT = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
PLAN_ID_DEP = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TYPE = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
WORKYEAR = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_PLAN_REGISTER", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_T_FM_DEPARTMENT_DEPARTMENT_ID_WORKSHOP",
column: x => x.DEPARTMENT_ID_WORKSHOP,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_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_OH_HEALTH_EXAM_PLAN_REGISTER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_T_OH_HEALTH_EAXM_PLAN_DEPARTMENT_PLAN_ID_DEP",
column: x => x.PLAN_ID_DEP,
principalTable: "T_OH_HEALTH_EAXM_PLAN_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_T_OH_HEALTH_EXAM_CYCLE_EXAM_CYCLE_ID",
column: x => x.EXAM_CYCLE_ID,
principalTable: "T_OH_HEALTH_EXAM_CYCLE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_T_OH_HEALTH_EXAM_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_OH_HEALTH_EXAM_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_CHECK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BEGINTIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONEY = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT = table.Column<int>(type: "int", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_CHECK", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_CHECK_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_CHECK_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_CHECK_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_CHECK_T_TI_PROJECT_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TI_PROJECT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_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_TI_PROJECT_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_TI_PROJECT_FILE_T_TI_PROJECT_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TI_PROJECT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_MONEY",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BEGINTIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_MONEY", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_MONEY_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_MONEY_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_MONEY_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_MONEY_T_TI_PROJECT_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TI_PROJECT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_RANGE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RANGE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_RANGE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_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_TI_PROJECT_RANGE_T_TI_PLAN_RANGE_TYPE_RANGE_ID",
column: x => x.RANGE_ID,
principalTable: "T_TI_PLAN_RANGE_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_RANGE_T_TI_PROJECT_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TI_PROJECT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_SOURCE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SOURCE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_SOURCE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_SOURCE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_SOURCE_T_TI_PLAN_SOURCE_TYPE_SOURCE_ID",
column: x => x.SOURCE_ID,
principalTable: "T_TI_PLAN_SOURCE_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_SOURCE_T_TI_PROJECT_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TI_PROJECT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_WFFILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_WFFILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_WFFILE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_WFFILE_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_TI_PROJECT_WFFILE_T_TI_PROJECT_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TI_PROJECT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_BACK_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BACK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
DATEEND = table.Column<DateTime>(type: "datetime2", nullable: true),
DATESTART = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NUM = table.Column<int>(type: "int", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_BACK_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_BACK_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_TL_BACK_DETAIL_T_TL_BACK_BACK_ID",
column: x => x.BACK_ID,
principalTable: "T_TL_BACK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_BACK_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BACK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_BACK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_BACK_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_TL_BACK_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_TL_BACK_FILE_T_TL_BACK_BACK_ID",
column: x => x.BACK_ID,
principalTable: "T_TL_BACK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_BACK_REQUIRE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BACK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REQUIRE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_BACK_REQUIRE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_BACK_REQUIRE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_REQUIRE_T_TL_BACK_BACK_ID",
column: x => x.BACK_ID,
principalTable: "T_TL_BACK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_REQUIRE_T_TL_REQUIRE_REQUIRE_ID",
column: x => x.REQUIRE_ID,
principalTable: "T_TL_REQUIRE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_BACK_RECORD_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BACK_RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
ISMAINCHECK = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_BACK_RECORD_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_BACK_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_TL_BACK_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_TL_BACK_RECORD_USER_T_TL_BACK_RECORD_BACK_RECORD_ID",
column: x => x.BACK_RECORD_ID,
principalTable: "T_TL_BACK_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_CACULATE_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CACULATE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_CACULATE_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_CACULATE_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_TL_CACULATE_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_TL_CACULATE_FILE_T_TL_CACULATE_CACULATE_ID",
column: x => x.CACULATE_ID,
principalTable: "T_TL_CACULATE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_FILE_SUM_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_FILE_SUM_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_FILE_SUM_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_TL_FILE_SUM_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_TL_FILE_SUM_FILE_T_TL_FILE_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_FILE_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_HIGH_CHECK_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HIGH_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_HIGH_CHECK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_HIGH_CHECK_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_TL_HIGH_CHECK_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_TL_HIGH_CHECK_FILE_T_TL_HIGH_CHECK_HIGH_ID",
column: x => x.HIGH_ID,
principalTable: "T_TL_HIGH_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_OUT_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OUT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_OUT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_OUT_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_TL_OUT_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_TL_OUT_FILE_T_TL_OUT_OUT_ID",
column: x => x.OUT_ID,
principalTable: "T_TL_OUT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_FINISH_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HIGHT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_FINISH_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_FINISH_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_TL_PROJECT_FINISH_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_TL_PROJECT_FINISH_FILE_T_TL_PROJECT_FINISH_HIGHT_ID",
column: x => x.HIGHT_ID,
principalTable: "T_TL_PROJECT_FINISH",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_HIGHT_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HIGHT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_HIGHT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_HIGHT_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_TL_PROJECT_HIGHT_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_TL_PROJECT_HIGHT_FILE_T_TL_PROJECT_HIGHT_HIGHT_ID",
column: x => x.HIGHT_ID,
principalTable: "T_TL_PROJECT_HIGHT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_INTRODUCE_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
INTRODUCE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_INTRODUCE_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_INTRODUCE_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_TL_PROJECT_INTRODUCE_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_TL_PROJECT_INTRODUCE_FILE_T_TL_PROJECT_INTRODUCE_INTRODUCE_ID",
column: x => x.INTRODUCE_ID,
principalTable: "T_TL_PROJECT_INTRODUCE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_RECORD_CHECK_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_RECORD_CHECK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_RECORD_CHECK_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_TL_PROJECT_RECORD_CHECK_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_TL_PROJECT_RECORD_CHECK_FILE_T_TL_PROJECT_RECORD_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TL_PROJECT_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_RECORD_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_RECORD_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_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_TL_PROJECT_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_TL_PROJECT_RECORD_FILE_T_TL_PROJECT_RECORD_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TL_PROJECT_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_RECORD_WATCH_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_RECORD_WATCH_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_RECORD_WATCH_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_TL_PROJECT_RECORD_WATCH_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_TL_PROJECT_RECORD_WATCH_FILE_T_TL_PROJECT_RECORD_PROJECT_ID",
column: x => x.PROJECT_ID,
principalTable: "T_TL_PROJECT_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_SLOPEBANK_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SLOPEBANK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_SLOPEBANK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_SLOPEBANK_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_TL_PROJECT_SLOPEBANK_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_TL_PROJECT_SLOPEBANK_FILE_T_TL_PROJECT_SLOPEBANK_SLOPEBANK_ID",
column: x => x.SLOPEBANK_ID,
principalTable: "T_TL_PROJECT_SLOPEBANK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_SLOPEBANK_PROJ_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SLOPEBANK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_SLOPEBANK_PROJ_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_SLOPEBANK_PROJ_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_TL_PROJECT_SLOPEBANK_PROJ_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_TL_PROJECT_SLOPEBANK_PROJ_FILE_T_TL_PROJECT_SLOPEBANK_SLOPEBANK_ID",
column: x => x.SLOPEBANK_ID,
principalTable: "T_TL_PROJECT_SLOPEBANK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_PROJECT_SLOPEBANK_SUB_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SLOPEBANK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_PROJECT_SLOPEBANK_SUB_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_PROJECT_SLOPEBANK_SUB_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_TL_PROJECT_SLOPEBANK_SUB_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_TL_PROJECT_SLOPEBANK_SUB_FILE_T_TL_PROJECT_SLOPEBANK_SLOPEBANK_ID",
column: x => x.SLOPEBANK_ID,
principalTable: "T_TL_PROJECT_SLOPEBANK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_QUALITY_CHECK_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
QUALITY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_QUALITY_CHECK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_QUALITY_CHECK_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_TL_QUALITY_CHECK_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_TL_QUALITY_CHECK_FILE_T_TL_QUALITY_CHECK_QUALITY_ID",
column: x => x.QUALITY_ID,
principalTable: "T_TL_QUALITY_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_DAYLY",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: false),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_DAYLY", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_LINE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: false),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_LINE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_MOVE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: false),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_MOVE", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_PERCENT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: false),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_PERCENT", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PUNISHMENT_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
PUNISHMENT_RESULT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
INJURED_AREA = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
INJURED_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DAMAGE_OBJECT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT_T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT_DAMAGE_OBJECT_ID",
column: x => x.DAMAGE_OBJECT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EQUIPMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FACILITIES_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LOSS_CONDITION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MACHINE_NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SPEC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_T_HM_EQUIPMENT_EQUIPMENT_ID",
column: x => x.EQUIPMENT_ID,
principalTable: "T_HM_EQUIPMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_T_HM_FACILITIES_FACILITIES_ID",
column: x => x.FACILITIES_ID,
principalTable: "T_HM_FACILITIES",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_FILE_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_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_AE_ACCIDENT_EVENT_SURVEY_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_AE_ACCIDENT_EVENT_SURVEY_FORENSICS",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EVIDENCE_DESC = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
EVIDENCE_SOURCE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_PFILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_PFILE", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_PFILE_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_PFILE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_PFILE_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_AE_ACCIDENT_EVENT_SURVEY_REASON",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REASON_ANALYZE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
REASON_MODEL = table.Column<int>(type: "int", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_REASON", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_REASON_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_REASON_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TEAM_MEMBER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_TEAM_MEMBER_ID",
column: x => x.TEAM_MEMBER_ID,
principalTable: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TEAM_MEMBER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_TEAM_MEMBER_ID",
column: x => x.TEAM_MEMBER_ID,
principalTable: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_INVESTIGATION_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ACCIDENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
APPROVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
INVESTIGATION_LOCATION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
INVESTIGATION_REASON = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
INVESTIGATION_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LAUNCH_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
LEADER_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REVIEW_COMMENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
REVIEW_OK = table.Column<bool>(type: "bit", nullable: true),
SCENE_DESC = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
SCENE_ENV_DESC = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
SCENE_EVIDENCE_DESC = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TEAM_MEMBER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_INVESTIGATION_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_T_AE_ACCIDENT_EVENT_REPORT_ACCIDENT_ID",
column: x => x.ACCIDENT_ID,
principalTable: "T_AE_ACCIDENT_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_TEAM_MEMBER_ID",
column: x => x.TEAM_MEMBER_ID,
principalTable: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_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_AE_INVESTIGATION_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_AE_INVESTIGATION_RECORD_T_FM_USER_LEADER_USER_ID",
column: x => x.LEADER_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_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_AE_INVESTIGATION_RECORD_T_PF_APPROVE_APPROVE_ID",
column: x => x.APPROVE_ID,
principalTable: "T_PF_APPROVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_INSURANCE_CLAIM_RECORD_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_INSURANCE_CLAIM_RECORD_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_INSURANCE_CLAIM_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_TI_INSURANCE_CLAIM_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_TI_INSURANCE_CLAIM_RECORD_FILE_T_TI_INSURANCE_CLAIM_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_TI_INSURANCE_CLAIM_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DETECTION_INSPECTION_RECORD_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEVICE_RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DETECTION_INSPECTION_RECORD_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DETECTION_INSPECTION_RECORD_FILE_T_DM_DETECTION_INSPECTION_RECORD_DEVICE_RECORD_ID",
column: x => x.DEVICE_RECORD_ID,
principalTable: "T_DM_DETECTION_INSPECTION_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DETECTION_INSPECTION_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_DM_DETECTION_INSPECTION_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);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_BASE_CHECK_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BASECHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISMAIN = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_CHECK_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_CHECK_USER_T_DM_DEVICE_BASE_CHECK_BASECHECK_ID",
column: x => x.BASECHECK_ID,
principalTable: "T_DM_DEVICE_BASE_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_CHECK_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_DM_DEVICE_BASE_CHECK_USER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_BASE_INSPECTION_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PARENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_INSPECTION_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_INSPECTION_FILE_T_DM_DEVICE_BASE_INSPECTION_PARENT_ID",
column: x => x.PARENT_ID,
principalTable: "T_DM_DEVICE_BASE_INSPECTION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_INSPECTION_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_DM_DEVICE_BASE_INSPECTION_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_DM_DEVICE_BASE_OVERHAUL_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FILE_PARENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_BASE_OVERHAUL_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_OVERHAUL_FILE_T_DM_DEVICE_BASE_OVERHAUL_FILE_PARENT_ID",
column: x => x.FILE_PARENT_ID,
principalTable: "T_DM_DEVICE_BASE_OVERHAUL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_BASE_OVERHAUL_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_DM_DEVICE_BASE_OVERHAUL_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_DM_DEVICE_CHECK_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BASECHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECK_VALUE = table.Column<int>(type: "int", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DESCRIPTION = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
DEVICEBASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DEVICE_CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
ITEM1 = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ITEM2 = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ITEM3 = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ROW_NO = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_CHECK_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_DETAIL_T_DM_DEVICE_BASE_CHECK_BASECHECK_ID",
column: x => x.BASECHECK_ID,
principalTable: "T_DM_DEVICE_BASE_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_DETAIL_T_DM_DEVICE_CHECK_DEVICE_CHECK_ID",
column: x => x.DEVICE_CHECK_ID,
principalTable: "T_DM_DEVICE_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_DETAIL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_CHECK_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_CHECK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_FILE_T_DM_DEVICE_CHECK_CHECK_ID",
column: x => x.CHECK_ID,
principalTable: "T_DM_DEVICE_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_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_DM_DEVICE_CHECK_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_DM_DEVICE_CHECK_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
ISMAIN = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_CHECK_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_USER_T_DM_DEVICE_CHECK_CHECK_ID",
column: x => x.CHECK_ID,
principalTable: "T_DM_DEVICE_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_CHECK_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_DM_DEVICE_CHECK_USER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CONTENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
COUNT = table.Column<int>(type: "int", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DEVICEBASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MACHINE_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLANID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POSITION = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Result = table.Column<int>(type: "int", nullable: true),
SPEC = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_T_DM_DEVICE_BASE_DEVICEBASE_ID",
column: x => x.DEVICEBASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_T_DM_DEVICE_MAINTENANCE_CHECK_CHECK_ID",
column: x => x.CHECK_ID,
principalTable: "T_DM_DEVICE_MAINTENANCE_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_T_DM_DEVICE_MAINTENANCE_PLAN_PLANID",
column: x => x.PLANID,
principalTable: "T_DM_DEVICE_MAINTENANCE_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_MAINTENANCE_PLAN_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_MAINTENANCE_PLAN_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_PLAN_FILE_T_DM_DEVICE_MAINTENANCE_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_DM_DEVICE_MAINTENANCE_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_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_DM_DEVICE_MAINTENANCE_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);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_MAINTENANCE_PLAN_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
ISMAIN = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_MAINTENANCE_PLAN_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_PLAN_USER_T_DM_DEVICE_MAINTENANCE_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_DM_DEVICE_MAINTENANCE_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_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_DM_DEVICE_MAINTENANCE_PLAN_USER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_MAINTENANCE_PPLAN_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_MAINTENANCE_PPLAN_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_PPLAN_FILE_T_DM_DEVICE_MAINTENANCE_PLAN_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_DM_DEVICE_MAINTENANCE_PLAN",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_MAINTENANCE_PPLAN_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_DM_DEVICE_MAINTENANCE_PPLAN_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_DM_DEVICE_OVERHAUL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECK_OPINION = table.Column<int>(type: "int", nullable: false),
CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DEVICE_BASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXTERNAL_SUPPORT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
IS_HELP = table.Column<bool>(type: "bit", nullable: false),
MACHINE_CODE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MACHINE_NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MALFUCTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
OPINION = table.Column<int>(type: "int", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OVERHAUL_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
POSITION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
REPAIR_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SPEC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_OVERHAUL", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_OVERHAUL_T_DM_DEVICE_BASE_DEVICE_BASE_ID",
column: x => x.DEVICE_BASE_ID,
principalTable: "T_DM_DEVICE_BASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_OVERHAUL_T_DM_DEVICE_REPAIR_REPAIR_ID",
column: x => x.REPAIR_ID,
principalTable: "T_DM_DEVICE_REPAIR",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_OVERHAUL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_OVERHAUL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_DM_DEVICE_REPAIR_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REPAIR_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_REPAIR_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_REPAIR_FILE_T_DM_DEVICE_REPAIR_REPAIR_ID",
column: x => x.REPAIR_ID,
principalTable: "T_DM_DEVICE_REPAIR",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_REPAIR_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_DM_DEVICE_REPAIR_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_OH_EXAM_NOTICE_OCC_HAZARD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HAZARD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REGISTER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_EXAM_NOTICE_OCC_HAZARD", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_EXAM_NOTICE_OCC_HAZARD_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_EXAM_NOTICE_OCC_HAZARD_T_HM_IDENTIFYING_HAZARD_ID",
column: x => x.HAZARD_ID,
principalTable: "T_HM_IDENTIFYING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_EXAM_NOTICE_OCC_HAZARD_T_OH_HEALTH_EXAM_NOTICE_REGISTER_REGISTER_ID",
column: x => x.REGISTER_ID,
principalTable: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_RESULT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NOTICE_REGISTER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ENUM = table.Column<int>(type: "int", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
SUGGESTION = table.Column<string>(type: "nvarchar(800)", maxLength: 800, nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_RESULT", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_T_OH_HEALTH_EXAM_NOTICE_REGISTER_NOTICE_REGISTER_ID",
column: x => x.NOTICE_REGISTER_ID,
principalTable: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HAZARD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REGISTER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD_T_HM_IDENTIFYING_HAZARD_ID",
column: x => x.HAZARD_ID,
principalTable: "T_HM_IDENTIFYING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD_T_OH_HEALTH_EXAM_PLAN_REGISTER_REGISTER_ID",
column: x => x.REGISTER_ID,
principalTable: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_CHECK_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_CHECK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_CHECK_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_TI_PROJECT_CHECK_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_TI_PROJECT_CHECK_FILE_T_TI_PROJECT_CHECK_PROJECT_CHECK_ID",
column: x => x.PROJECT_CHECK_ID,
principalTable: "T_TI_PROJECT_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_CHECK_WFFILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PROJECT_CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_CHECK_WFFILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_CHECK_WFFILE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TI_PROJECT_CHECK_WFFILE_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_TI_PROJECT_CHECK_WFFILE_T_TI_PROJECT_CHECK_PROJECT_CHECK_ID",
column: x => x.PROJECT_CHECK_ID,
principalTable: "T_TI_PROJECT_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_MONEY_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LEFT = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MONEY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NAME = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ROW_NO = table.Column<int>(type: "int", nullable: false),
TOTAL = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
USE = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_MONEY_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_MONEY_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_TI_PROJECT_MONEY_DETAIL_T_TI_PROJECT_MONEY_MONEY_ID",
column: x => x.MONEY_ID,
principalTable: "T_TI_PROJECT_MONEY",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_BACK_DETAIL_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BACK_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BACK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
ISMAINCHECK = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_BACK_DETAIL_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_BACK_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_TL_BACK_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_TL_BACK_DETAIL_USER_T_TL_BACK_BACK_ID",
column: x => x.BACK_ID,
principalTable: "T_TL_BACK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_BACK_DETAIL_USER_T_TL_BACK_DETAIL_BACK_DETAIL_ID",
column: x => x.BACK_DETAIL_ID,
principalTable: "T_TL_BACK_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_DAYLY_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
DAYLY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DREEP = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HIGHTEST = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
HIGHT_MORE = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LONG = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
WATERLINE = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_DAYLY_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_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_TL_WATCH_DAYLY_DETAIL_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_DETAIL_T_TL_WATCH_DAYLY_DAYLY_ID",
column: x => x.DAYLY_ID,
principalTable: "T_TL_WATCH_DAYLY",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_DETAIL_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_LINE_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
DEEP = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LINE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
WATCH_LINE_POINT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_LINE_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_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_TL_WATCH_LINE_DETAIL_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_DETAIL_T_TL_WATCH_LINE_LINE_ID",
column: x => x.LINE_ID,
principalTable: "T_TL_WATCH_LINE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_DETAIL_T_TL_WATCH_LINE_POINT_WATCH_LINE_POINT_ID",
column: x => x.WATCH_LINE_POINT_ID,
principalTable: "T_TL_WATCH_LINE_POINT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_DETAIL_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_MOVE_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHANGELOOKPOINT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LOOKPOINT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MOVE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
WATCH_MOVE_POINT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_MOVE_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_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_TL_WATCH_MOVE_DETAIL_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_DETAIL_T_TL_WATCH_MOVE_MOVE_ID",
column: x => x.MOVE_ID,
principalTable: "T_TL_WATCH_MOVE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_DETAIL_T_TL_WATCH_MOVE_POINT_WATCH_MOVE_POINT_ID",
column: x => x.WATCH_MOVE_POINT_ID,
principalTable: "T_TL_WATCH_MOVE_POINT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_DETAIL_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_PERCENT_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DATE = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
INT_PERCENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OUT_PERCENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
PERCENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SUM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TAILING_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_PERCENT_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_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_TL_WATCH_PERCENT_DETAIL_T_TL_TAILING_TAILING_ID",
column: x => x.TAILING_ID,
principalTable: "T_TL_TAILING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_DETAIL_T_TL_WATCH_PERCENT_PERCENT_ID",
column: x => x.PERCENT_ID,
principalTable: "T_TL_WATCH_PERCENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_DETAIL_T_TL_WATCH_SUM_SUM_ID",
column: x => x.SUM_ID,
principalTable: "T_TL_WATCH_SUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SURVEY_FORENSICS_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_SURVEY_FORENSICS_ID",
column: x => x.SURVEY_FORENSICS_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_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_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_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_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REASON_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REASON_TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE_T_AE_ACCIDENT_EVENT_REASON_TYPE_REASON_TYPE_ID",
column: x => x.REASON_TYPE_ID,
principalTable: "T_AE_ACCIDENT_EVENT_REASON_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE_T_AE_ACCIDENT_EVENT_SURVEY_REASON_REASON_ID",
column: x => x.REASON_ID,
principalTable: "T_AE_ACCIDENT_EVENT_SURVEY_REASON",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_INVESTIGATION_RECORD_ACC_FILES",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_INVESTIGATION_RECORD_ACC_FILES", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_ACC_FILES_T_AE_INVESTIGATION_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_AE_INVESTIGATION_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_ACC_FILES_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_ACC_FILES_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_AE_INVESTIGATION_RECORD_ASK_USERS",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_INVESTIGATION_RECORD_ASK_USERS", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_ASK_USERS_T_AE_INVESTIGATION_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_AE_INVESTIGATION_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_ASK_USERS_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_ASK_USERS_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_INVESTIGATION_RECORD_CHART_FILES",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_INVESTIGATION_RECORD_CHART_FILES", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_CHART_FILES_T_AE_INVESTIGATION_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_AE_INVESTIGATION_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_CHART_FILES_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_CHART_FILES_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_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS_T_AE_INVESTIGATION_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_AE_INVESTIGATION_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_AE_INVESTIGATION_RECORD_NOTES_FILES",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_AE_INVESTIGATION_RECORD_NOTES_FILES", x => x.ID);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_NOTES_FILES_T_AE_INVESTIGATION_RECORD_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_AE_INVESTIGATION_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_NOTES_FILES_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_AE_INVESTIGATION_RECORD_NOTES_FILES_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_DM_DEVICE_OVERHAUL_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OVERHAUL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_DM_DEVICE_OVERHAUL_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_DM_DEVICE_OVERHAUL_FILE_T_DM_DEVICE_OVERHAUL_OVERHAUL_ID",
column: x => x.OVERHAUL_ID,
principalTable: "T_DM_DEVICE_OVERHAUL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_DM_DEVICE_OVERHAUL_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_DM_DEVICE_OVERHAUL_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_OH_EXAM_RESULT_OCC_HAZARD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
HAZARD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
T_OH_HEALTH_EXAM_RESULTID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_EXAM_RESULT_OCC_HAZARD", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_EXAM_RESULT_OCC_HAZARD_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_EXAM_RESULT_OCC_HAZARD_T_HM_IDENTIFYING_HAZARD_ID",
column: x => x.HAZARD_ID,
principalTable: "T_HM_IDENTIFYING",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_EXAM_RESULT_OCC_HAZARD_T_OH_HEALTH_EXAM_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_OH_HEALTH_EXAM_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_EXAM_RESULT_OCC_HAZARD_T_OH_HEALTH_EXAM_RESULT_T_OH_HEALTH_EXAM_RESULTID",
column: x => x.T_OH_HEALTH_EXAM_RESULTID,
principalTable: "T_OH_HEALTH_EXAM_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DESCRIPTION = table.Column<string>(type: "nvarchar(600)", maxLength: 600, nullable: true),
DIAGNOSE_AGENCY = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
DIAGNOSE_METHOD = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MEDICAL_AID = table.Column<int>(type: "int", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
OCC_DISEASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
OCC_DISEASE_SEVERITY_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
OCC_HISTORY = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_T_OH_HEALTH_EXAM_OCC_DISEASE_OCC_DISEASE_ID",
column: x => x.OCC_DISEASE_ID,
principalTable: "T_OH_HEALTH_EXAM_OCC_DISEASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL_OCC_DISEASE_SEVERITY_ID",
column: x => x.OCC_DISEASE_SEVERITY_ID,
principalTable: "T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_T_OH_HEALTH_EXAM_RESULT_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_OH_HEALTH_EXAM_RESULT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TI_PROJECT_MONEY_DETAIL_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TI_PROJECT_MONEY_DETAIL_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_TI_PROJECT_MONEY_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_TI_PROJECT_MONEY_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);
table.ForeignKey(
name: "FK_T_TI_PROJECT_MONEY_DETAIL_FILE_T_TI_PROJECT_MONEY_DETAIL_DETAIL_ID",
column: x => x.DETAIL_ID,
principalTable: "T_TI_PROJECT_MONEY_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_DAYLY_DETAIL_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DAYLY_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_DAYLY_DETAIL_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_DAYLY_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_TL_WATCH_DAYLY_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_TL_WATCH_DAYLY_DETAIL_USER_T_TL_WATCH_DAYLY_DETAIL_DAYLY_DETAIL_ID",
column: x => x.DAYLY_DETAIL_ID,
principalTable: "T_TL_WATCH_DAYLY_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_LINE_DETAIL_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LINE_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_LINE_DETAIL_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_LINE_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_TL_WATCH_LINE_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_TL_WATCH_LINE_DETAIL_USER_T_TL_WATCH_LINE_DETAIL_LINE_DETAIL_ID",
column: x => x.LINE_DETAIL_ID,
principalTable: "T_TL_WATCH_LINE_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_MOVE_DETAIL_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MOVE_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_MOVE_DETAIL_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_MOVE_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_TL_WATCH_MOVE_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_TL_WATCH_MOVE_DETAIL_USER_T_TL_WATCH_MOVE_DETAIL_MOVE_DETAIL_ID",
column: x => x.MOVE_DETAIL_ID,
principalTable: "T_TL_WATCH_MOVE_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_TL_WATCH_PERCENT_DETAIL_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ISCHECK = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PERCENT_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_TL_WATCH_PERCENT_DETAIL_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_TL_WATCH_PERCENT_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_TL_WATCH_PERCENT_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_TL_WATCH_PERCENT_DETAIL_USER_T_TL_WATCH_PERCENT_DETAIL_PERCENT_DETAIL_ID",
column: x => x.PERCENT_DETAIL_ID,
principalTable: "T_TL_WATCH_PERCENT_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
DISEASE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_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_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_DISEASE_ID",
column: x => x.DISEASE_ID,
principalTable: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
column: x => x.IMG_FILE_ID,
principalTable: "T_PF_IMG_FILE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_T_CM_RSP_ESTIMATE_EVENT_KIND_KIND_ID",
table: "T_CM_RSP_ESTIMATE_EVENT_KIND",
column: "KIND_ID");
migrationBuilder.CreateIndex(
name: "IX_T_CM_RSP_ESTIMATE_ACCIDENT_TYPE_ID",
table: "T_CM_RSP_ESTIMATE",
column: "ACCIDENT_TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_CM_RSP_ESTIMATE_EVENT_ID",
table: "T_CM_RSP_ESTIMATE",
column: "EVENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_DAMAGE_OBJECT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REASON_TYPE_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_REASON_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_ACCIDENT_TYPE_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT",
column: "ACCIDENT_TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_APPROVE_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_DEPARTMENT_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_USER_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_FILE_IMG_FILE_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_FILE_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_FILE_REPORT_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT_FILE",
column: "REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND_KIND_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND",
column: "KIND_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND_REPORT_ID",
table: "T_AE_ACCIDENT_EVENT_REPORT_LIST_KIND",
column: "REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_DEPARTMENT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT_USER_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_ADM_PUNISHMENT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES_USER_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_CASUALTIES",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT_DAMAGE_OBJECT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT",
column: "DAMAGE_OBJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_DAMAGE_OBJECT",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_EQUIPMENT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS",
column: "EQUIPMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_FACILITIES_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS",
column: "FACILITIES_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS_USER_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_EQUIPMENT_LOSS",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FILE_IMG_FILE_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FILE_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FILE_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FILE",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE_IMG_FILE_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE_SURVEY_FORENSICS_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_FORENSICS_FILE",
column: "SURVEY_FORENSICS_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_PFILE_IMG_FILE_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_PFILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_PFILE_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_PFILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_PFILE_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_PFILE",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_REASON_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_REASON",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_REASON_RESULT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_REASON",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE_REASON_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE",
column: "REASON_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE_REASON_TYPE_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_REASON_TYPE",
column: "REASON_TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_APPROVE_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_ORG_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_REPORT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
column: "REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_EVENT_SURVEY_RESULT_RISK_SUBMIT_ID",
table: "T_AE_ACCIDENT_EVENT_SURVEY_RESULT",
column: "RISK_SUBMIT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_KIND_ORG_ID",
table: "T_AE_ACCIDENT_KIND",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_LEVEL_DAYS_ORG_ID",
table: "T_AE_ACCIDENT_LEVEL_DAYS",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER_ORG_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER_TEAM_MEMBER_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER",
column: "TEAM_MEMBER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER_USER_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_DEPUTY_LEADER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_LEADER_USER_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
column: "LEADER_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_ORG_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_REPORT_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
column: "REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_MEMBER_SURVEY_USER_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBER",
column: "SURVEY_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS_ORG_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS_TEAM_MEMBER_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS",
column: "TEAM_MEMBER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS_USER_ID",
table: "T_AE_ACCIDENT_SURVEY_TEAM_MEMBERS",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_ACCIDENT_TYPE_ORG_ID",
table: "T_AE_ACCIDENT_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_DOSET_DEPARTMENT_USER_DEPARTMENT_ID",
table: "T_AE_DOSET_DEPARTMENT_USER",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_DOSET_DEPARTMENT_USER_ORG_ID",
table: "T_AE_DOSET_DEPARTMENT_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_DOSET_DEPARTMENT_USER_POST_ID",
table: "T_AE_DOSET_DEPARTMENT_USER",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ACCIDENT_ID",
table: "T_AE_INVESTIGATION_RECORD",
column: "ACCIDENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_APPROVE_ID",
table: "T_AE_INVESTIGATION_RECORD",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_DEPARTMENT_ID",
table: "T_AE_INVESTIGATION_RECORD",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_LEADER_USER_ID",
table: "T_AE_INVESTIGATION_RECORD",
column: "LEADER_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ORG_ID",
table: "T_AE_INVESTIGATION_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_TEAM_MEMBER_ID",
table: "T_AE_INVESTIGATION_RECORD",
column: "TEAM_MEMBER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_USER_ID",
table: "T_AE_INVESTIGATION_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ACC_FILES_IMG_FILE_ID",
table: "T_AE_INVESTIGATION_RECORD_ACC_FILES",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ACC_FILES_ORG_ID",
table: "T_AE_INVESTIGATION_RECORD_ACC_FILES",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ACC_FILES_RECORD_ID",
table: "T_AE_INVESTIGATION_RECORD_ACC_FILES",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ASK_USERS_ORG_ID",
table: "T_AE_INVESTIGATION_RECORD_ASK_USERS",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ASK_USERS_RECORD_ID",
table: "T_AE_INVESTIGATION_RECORD_ASK_USERS",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_ASK_USERS_USER_ID",
table: "T_AE_INVESTIGATION_RECORD_ASK_USERS",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_CHART_FILES_IMG_FILE_ID",
table: "T_AE_INVESTIGATION_RECORD_CHART_FILES",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_CHART_FILES_ORG_ID",
table: "T_AE_INVESTIGATION_RECORD_CHART_FILES",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_CHART_FILES_RECORD_ID",
table: "T_AE_INVESTIGATION_RECORD_CHART_FILES",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS_ORG_ID",
table: "T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS_RECORD_ID",
table: "T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS_USER_ID",
table: "T_AE_INVESTIGATION_RECORD_INVESTIGATION_USERS",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_NOTES_FILES_IMG_FILE_ID",
table: "T_AE_INVESTIGATION_RECORD_NOTES_FILES",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_NOTES_FILES_ORG_ID",
table: "T_AE_INVESTIGATION_RECORD_NOTES_FILES",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_AE_INVESTIGATION_RECORD_NOTES_FILES_RECORD_ID",
table: "T_AE_INVESTIGATION_RECORD_NOTES_FILES",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_CATEGORY_ORG_ID",
table: "T_DM_CATEGORY",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DETECTION_INSPECTION_RECORD_DEPARTMENT_ID",
table: "T_DM_DETECTION_INSPECTION_RECORD",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DETECTION_INSPECTION_RECORD_DEVICE_BASE_ID",
table: "T_DM_DETECTION_INSPECTION_RECORD",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DETECTION_INSPECTION_RECORD_ORG_ID",
table: "T_DM_DETECTION_INSPECTION_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DETECTION_INSPECTION_RECORD_USER_ID",
table: "T_DM_DETECTION_INSPECTION_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DETECTION_INSPECTION_RECORD_FILE_DEVICE_RECORD_ID",
table: "T_DM_DETECTION_INSPECTION_RECORD_FILE",
column: "DEVICE_RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DETECTION_INSPECTION_RECORD_FILE_IMG_FILE_ID",
table: "T_DM_DETECTION_INSPECTION_RECORD_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DETECTION_INSPECTION_RECORD_FILE_ORG_ID",
table: "T_DM_DETECTION_INSPECTION_RECORD_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_APPLY_DEPARTMENT_ID",
table: "T_DM_DEVICE_APPLY",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_APPLY_ORG_ID",
table: "T_DM_DEVICE_APPLY",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_APPLY_USER_ID",
table: "T_DM_DEVICE_APPLY",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_APPLY_DETAIL_DEVICE_APPLY_ID",
table: "T_DM_DEVICE_APPLY_DETAIL",
column: "DEVICE_APPLY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_APPLY_DETAIL_DEVICE_BASE_ID",
table: "T_DM_DEVICE_APPLY_DETAIL",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_APPLY_DETAIL_ORG_ID",
table: "T_DM_DEVICE_APPLY_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_CATEGORY_ID",
table: "T_DM_DEVICE_BASE",
column: "CATEGORY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_DEPARTMENT_ID",
table: "T_DM_DEVICE_BASE",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_ORG_ID",
table: "T_DM_DEVICE_BASE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_TYPE_ID",
table: "T_DM_DEVICE_BASE",
column: "TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_USER_ID",
table: "T_DM_DEVICE_BASE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_CHECK_DEVICEBASE_ID",
table: "T_DM_DEVICE_BASE_CHECK",
column: "DEVICEBASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_CHECK_ORG_ID",
table: "T_DM_DEVICE_BASE_CHECK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_CHECK_T_DM_DEVICE_BASEID",
table: "T_DM_DEVICE_BASE_CHECK",
column: "T_DM_DEVICE_BASEID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_CHECK_USER_BASECHECK_ID",
table: "T_DM_DEVICE_BASE_CHECK_USER",
column: "BASECHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_CHECK_USER_ORG_ID",
table: "T_DM_DEVICE_BASE_CHECK_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_CHECK_USER_USER_ID",
table: "T_DM_DEVICE_BASE_CHECK_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_FILE_DEVICE_BASE_ID",
table: "T_DM_DEVICE_BASE_FILE",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_BASE_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_FILE_ORG_ID",
table: "T_DM_DEVICE_BASE_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_INSPECTION_DEPARTMENT_ID",
table: "T_DM_DEVICE_BASE_INSPECTION",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_INSPECTION_DEVICE_BASE_ID",
table: "T_DM_DEVICE_BASE_INSPECTION",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_INSPECTION_ORG_ID",
table: "T_DM_DEVICE_BASE_INSPECTION",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_INSPECTION_USER_ID",
table: "T_DM_DEVICE_BASE_INSPECTION",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_INSPECTION_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_BASE_INSPECTION_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_INSPECTION_FILE_ORG_ID",
table: "T_DM_DEVICE_BASE_INSPECTION_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_INSPECTION_FILE_PARENT_ID",
table: "T_DM_DEVICE_BASE_INSPECTION_FILE",
column: "PARENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_OVERHAUL_DEVICE_BASE_ID",
table: "T_DM_DEVICE_BASE_OVERHAUL",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_OVERHAUL_ORG_ID",
table: "T_DM_DEVICE_BASE_OVERHAUL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_OVERHAUL_USER_ID",
table: "T_DM_DEVICE_BASE_OVERHAUL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_OVERHAUL_FILE_FILE_PARENT_ID",
table: "T_DM_DEVICE_BASE_OVERHAUL_FILE",
column: "FILE_PARENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_OVERHAUL_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_BASE_OVERHAUL_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_OVERHAUL_FILE_ORG_ID",
table: "T_DM_DEVICE_BASE_OVERHAUL_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_PURCHASE_DEVICE_BASE_ID",
table: "T_DM_DEVICE_BASE_PURCHASE",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_BASE_PURCHASE_ORG_ID",
table: "T_DM_DEVICE_BASE_PURCHASE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_DEVICEBASE_ID",
table: "T_DM_DEVICE_CHECK",
column: "DEVICEBASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_ORG_ID",
table: "T_DM_DEVICE_CHECK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_SCHEDULIN_ID",
table: "T_DM_DEVICE_CHECK",
column: "SCHEDULIN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_DETAIL_BASECHECK_ID",
table: "T_DM_DEVICE_CHECK_DETAIL",
column: "BASECHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_DETAIL_DEVICE_CHECK_ID",
table: "T_DM_DEVICE_CHECK_DETAIL",
column: "DEVICE_CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_DETAIL_ORG_ID",
table: "T_DM_DEVICE_CHECK_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_FILE_CHECK_ID",
table: "T_DM_DEVICE_CHECK_FILE",
column: "CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_CHECK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_FILE_ORG_ID",
table: "T_DM_DEVICE_CHECK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_TYPE_ORG_ID",
table: "T_DM_DEVICE_CHECK_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_USER_CHECK_ID",
table: "T_DM_DEVICE_CHECK_USER",
column: "CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_USER_ORG_ID",
table: "T_DM_DEVICE_CHECK_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_CHECK_USER_USER_ID",
table: "T_DM_DEVICE_CHECK_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_APPLY_ID",
table: "T_DM_DEVICE_ISSUE",
column: "APPLY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_DEPARTMENT_ID",
table: "T_DM_DEVICE_ISSUE",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_ORG_ID",
table: "T_DM_DEVICE_ISSUE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_USER_ID",
table: "T_DM_DEVICE_ISSUE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_DETAIL_DEPARTMENT_ID",
table: "T_DM_DEVICE_ISSUE_DETAIL",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_DETAIL_DEVICE_BASE_ID",
table: "T_DM_DEVICE_ISSUE_DETAIL",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_DETAIL_DEVICE_ISSUE_ID",
table: "T_DM_DEVICE_ISSUE_DETAIL",
column: "DEVICE_ISSUE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_DETAIL_ORG_ID",
table: "T_DM_DEVICE_ISSUE_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_ISSUE_DETAIL_USER_ID",
table: "T_DM_DEVICE_ISSUE_DETAIL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_APPROVE_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_ORG_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_USER_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_CHECK_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL",
column: "CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_DEVICEBASE_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL",
column: "DEVICEBASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_ORG_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL_PLANID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL",
column: "PLANID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_USER_CHECK_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK_USER",
column: "CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_USER_ORG_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_CHECK_USER_USER_ID",
table: "T_DM_DEVICE_MAINTENANCE_CHECK_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_APPROVE_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_CATEGORY_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN",
column: "CATEGORY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_DEVICEBASE_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN",
column: "DEVICEBASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_ORG_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_FILE_ORG_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_FILE_PLAN_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN_FILE",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_USER_ORG_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_USER_PLAN_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN_USER",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PLAN_USER_USER_ID",
table: "T_DM_DEVICE_MAINTENANCE_PLAN_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PPLAN_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_MAINTENANCE_PPLAN_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PPLAN_FILE_ORG_ID",
table: "T_DM_DEVICE_MAINTENANCE_PPLAN_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_MAINTENANCE_PPLAN_FILE_PLAN_ID",
table: "T_DM_DEVICE_MAINTENANCE_PPLAN_FILE",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_OVERHAUL_DEVICE_BASE_ID",
table: "T_DM_DEVICE_OVERHAUL",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_OVERHAUL_ORG_ID",
table: "T_DM_DEVICE_OVERHAUL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_OVERHAUL_REPAIR_ID",
table: "T_DM_DEVICE_OVERHAUL",
column: "REPAIR_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_OVERHAUL_USER_ID",
table: "T_DM_DEVICE_OVERHAUL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_OVERHAUL_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_OVERHAUL_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_OVERHAUL_FILE_ORG_ID",
table: "T_DM_DEVICE_OVERHAUL_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_OVERHAUL_FILE_OVERHAUL_ID",
table: "T_DM_DEVICE_OVERHAUL_FILE",
column: "OVERHAUL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_DEVICE_BASE_ID",
table: "T_DM_DEVICE_REPAIR",
column: "DEVICE_BASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_ORG_ID",
table: "T_DM_DEVICE_REPAIR",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_REPAIR_CHARGE_USER_ID",
table: "T_DM_DEVICE_REPAIR",
column: "REPAIR_CHARGE_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_REPAIR_USER_ID",
table: "T_DM_DEVICE_REPAIR",
column: "REPAIR_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_USER_ID",
table: "T_DM_DEVICE_REPAIR",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_FILE_IMG_FILE_ID",
table: "T_DM_DEVICE_REPAIR_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_FILE_ORG_ID",
table: "T_DM_DEVICE_REPAIR_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_DEVICE_REPAIR_FILE_REPAIR_ID",
table: "T_DM_DEVICE_REPAIR_FILE",
column: "REPAIR_ID");
migrationBuilder.CreateIndex(
name: "IX_T_DM_TYPE_ORG_ID",
table: "T_DM_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_EXAM_NOTICE_OCC_HAZARD_HAZARD_ID",
table: "T_OH_EXAM_NOTICE_OCC_HAZARD",
column: "HAZARD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_EXAM_NOTICE_OCC_HAZARD_ORG_ID",
table: "T_OH_EXAM_NOTICE_OCC_HAZARD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_EXAM_NOTICE_OCC_HAZARD_REGISTER_ID",
table: "T_OH_EXAM_NOTICE_OCC_HAZARD",
column: "REGISTER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_EXAM_RESULT_OCC_HAZARD_HAZARD_ID",
table: "T_OH_EXAM_RESULT_OCC_HAZARD",
column: "HAZARD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_EXAM_RESULT_OCC_HAZARD_ORG_ID",
table: "T_OH_EXAM_RESULT_OCC_HAZARD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_EXAM_RESULT_OCC_HAZARD_RESULT_ID",
table: "T_OH_EXAM_RESULT_OCC_HAZARD",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_EXAM_RESULT_OCC_HAZARD_T_OH_HEALTH_EXAM_RESULTID",
table: "T_OH_EXAM_RESULT_OCC_HAZARD",
column: "T_OH_HEALTH_EXAM_RESULTID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_ORG_ID",
table: "T_OH_HAZARD_MONITOR_JOB",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_TYPE_ID",
table: "T_OH_HAZARD_MONITOR_JOB",
column: "TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_USER_ID",
table: "T_OH_HAZARD_MONITOR_JOB",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_DETAIL_JOB_ID",
table: "T_OH_HAZARD_MONITOR_JOB_DETAIL",
column: "JOB_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_DETAIL_ORG_ID",
table: "T_OH_HAZARD_MONITOR_JOB_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_DETAIL_RULE_ID",
table: "T_OH_HAZARD_MONITOR_JOB_DETAIL",
column: "RULE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_FILE_IMG_FILE_ID",
table: "T_OH_HAZARD_MONITOR_JOB_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_FILE_ORG_ID",
table: "T_OH_HAZARD_MONITOR_JOB_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_FILE_RECORD_ID",
table: "T_OH_HAZARD_MONITOR_JOB_FILE",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_REPORT_DEPARTMENT_ID",
table: "T_OH_HAZARD_MONITOR_JOB_REPORT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_REPORT_ORG_ID",
table: "T_OH_HAZARD_MONITOR_JOB_REPORT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_REPORT_USER_ID",
table: "T_OH_HAZARD_MONITOR_JOB_REPORT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_REPORT_FILE_IMG_FILE_ID",
table: "T_OH_HAZARD_MONITOR_JOB_REPORT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_REPORT_FILE_ORG_ID",
table: "T_OH_HAZARD_MONITOR_JOB_REPORT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_JOB_REPORT_FILE_REPORT_ID",
table: "T_OH_HAZARD_MONITOR_JOB_REPORT_FILE",
column: "REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RESULT_ORG_ID",
table: "T_OH_HAZARD_MONITOR_RESULT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RESULT_RULE_ID",
table: "T_OH_HAZARD_MONITOR_RESULT",
column: "RULE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RESULT_SUM_ID",
table: "T_OH_HAZARD_MONITOR_RESULT",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RESULT_SUM_ORG_ID",
table: "T_OH_HAZARD_MONITOR_RESULT_SUM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RULE_DEPARTMENT_ID",
table: "T_OH_HAZARD_MONITOR_RULE",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RULE_DEPARTMENT_ID_WARN",
table: "T_OH_HAZARD_MONITOR_RULE",
column: "DEPARTMENT_ID_WARN");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RULE_DEPARTMENT_ID_WORKSHOP",
table: "T_OH_HAZARD_MONITOR_RULE",
column: "DEPARTMENT_ID_WORKSHOP");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RULE_ORG_ID",
table: "T_OH_HAZARD_MONITOR_RULE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RULE_RECORD_POST_ID",
table: "T_OH_HAZARD_MONITOR_RULE",
column: "RECORD_POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RULE_TYPE_ID",
table: "T_OH_HAZARD_MONITOR_RULE",
column: "TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_RULE_WARN_POST_ID",
table: "T_OH_HAZARD_MONITOR_RULE",
column: "WARN_POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HAZARD_MONITOR_TYPE_ORG_ID",
table: "T_OH_HAZARD_MONITOR_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID_HAZARD_ID",
table: "T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID",
column: "HAZARD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID_ORG_ID",
table: "T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID_RECORD_ID",
table: "T_OH_HEALTH_EAXM_CYCLE_OCC_HAZARD_MID",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_CYCLE_POST_MID_ORG_ID",
table: "T_OH_HEALTH_EAXM_CYCLE_POST_MID",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_CYCLE_POST_MID_RECORD_ID",
table: "T_OH_HEALTH_EAXM_CYCLE_POST_MID",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_CYCLE_POST_MID_SC_POST_ID",
table: "T_OH_HEALTH_EAXM_CYCLE_POST_MID",
column: "SC_POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_PLAN_DEPARTMENT_DEPARTMENT_ID",
table: "T_OH_HEALTH_EAXM_PLAN_DEPARTMENT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_PLAN_DEPARTMENT_ORG_ID",
table: "T_OH_HEALTH_EAXM_PLAN_DEPARTMENT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_PLAN_DEPARTMENT_PLAN_ID",
table: "T_OH_HEALTH_EAXM_PLAN_DEPARTMENT",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EAXM_PLAN_DEPARTMENT_USER_ID",
table: "T_OH_HEALTH_EAXM_PLAN_DEPARTMENT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_BATCH_ORG_ID",
table: "T_OH_HEALTH_EXAM_BATCH",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_BATCH_USER_ID",
table: "T_OH_HEALTH_EXAM_BATCH",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_BATCH_DEPARTMENT_BATCH_ID",
table: "T_OH_HEALTH_EXAM_BATCH_DEPARTMENT",
column: "BATCH_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_BATCH_DEPARTMENT_DEPARTMENT_ID",
table: "T_OH_HEALTH_EXAM_BATCH_DEPARTMENT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_BATCH_DEPARTMENT_ORG_ID",
table: "T_OH_HEALTH_EXAM_BATCH_DEPARTMENT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_CYCLE_ORG_ID",
table: "T_OH_HEALTH_EXAM_CYCLE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_DEPARTMENT_ID",
table: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_EXAM_CYCLE_ID",
table: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO",
column: "EXAM_CYCLE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_ORG_ID",
table: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST_DEPARTMENTINFO_ID",
table: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST",
column: "DEPARTMENTINFO_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST_ORG_ID",
table: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST_POST_ID",
table: "T_OH_HEALTH_EXAM_CYCLE_DEPARTMENTINFO_POST",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_APPROVE_ID",
table: "T_OH_HEALTH_EXAM_NOTICE",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_EXAM_BATCH_ID",
table: "T_OH_HEALTH_EXAM_NOTICE",
column: "EXAM_BATCH_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_ORG_ID",
table: "T_OH_HEALTH_EXAM_NOTICE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_FILE_IMG_FILE_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_FILE_NOTICE_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_FILE",
column: "NOTICE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_FILE_ORG_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_REGISTER_CYCLE_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
column: "CYCLE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_REGISTER_DEPARTMENT_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_REGISTER_DEPARTMENT_ID_WORKSHOP",
table: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
column: "DEPARTMENT_ID_WORKSHOP");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_REGISTER_EXAM_BATCH_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
column: "EXAM_BATCH_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_REGISTER_NOTICE_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
column: "NOTICE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_REGISTER_ORG_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_NOTICE_REGISTER_USER_ID",
table: "T_OH_HEALTH_EXAM_NOTICE_REGISTER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_OCC_DISEASE_ORG_ID",
table: "T_OH_HEALTH_EXAM_OCC_DISEASE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL_ORG_ID",
table: "T_OH_HEALTH_EXAM_OCC_DISEASE_SEVERITY_LEVEL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_APPROVE_ID",
table: "T_OH_HEALTH_EXAM_PLAN",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_ORG_ID",
table: "T_OH_HEALTH_EXAM_PLAN",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_DEPARTMENT_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_DEPARTMENT_ID_WORKSHOP",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "DEPARTMENT_ID_WORKSHOP");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_EXAM_CYCLE_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "EXAM_CYCLE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_ORG_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_PLAN_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_PLAN_ID_DEP",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "PLAN_ID_DEP");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_POST_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_USER_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD_HAZARD_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD",
column: "HAZARD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD_ORG_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD_REGISTER_ID",
table: "T_OH_HEALTH_EXAM_PLAN_REGISTER_HAZARD",
column: "REGISTER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_NOTICE_REGISTER_ID",
table: "T_OH_HEALTH_EXAM_RESULT",
column: "NOTICE_REGISTER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_ORG_ID",
table: "T_OH_HEALTH_EXAM_RESULT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_USER_ID",
table: "T_OH_HEALTH_EXAM_RESULT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_IMPORT_NOTICE_ID",
table: "T_OH_HEALTH_EXAM_RESULT_IMPORT",
column: "NOTICE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_IMPORT_ORG_ID",
table: "T_OH_HEALTH_EXAM_RESULT_IMPORT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_OCC_DISEASE_ID",
table: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE",
column: "OCC_DISEASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_OCC_DISEASE_SEVERITY_ID",
table: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE",
column: "OCC_DISEASE_SEVERITY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_ORG_ID",
table: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_RESULT_ID",
table: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE_DISEASE_ID",
table: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE",
column: "DISEASE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE_IMG_FILE_ID",
table: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE_ORG_ID",
table: "T_OH_HEALTH_EXAM_RESULT_OCC_DISEASE_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_RUNCONFIG_ORG_ID",
table: "T_OH_RUNCONFIG",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OH_RUNCONFIG_POST_ID",
table: "T_OH_RUNCONFIG",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_COST_TYPE_ORG_ID",
table: "T_TI_COST_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_CLAIM_RECORD_ACCIDENT_ID",
table: "T_TI_INSURANCE_CLAIM_RECORD",
column: "ACCIDENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_CLAIM_RECORD_DEPARTMENT_ID",
table: "T_TI_INSURANCE_CLAIM_RECORD",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_CLAIM_RECORD_ORG_ID",
table: "T_TI_INSURANCE_CLAIM_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_CLAIM_RECORD_USER_ID",
table: "T_TI_INSURANCE_CLAIM_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_CLAIM_RECORD_FILE_IMG_FILE_ID",
table: "T_TI_INSURANCE_CLAIM_RECORD_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_CLAIM_RECORD_FILE_ORG_ID",
table: "T_TI_INSURANCE_CLAIM_RECORD_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_CLAIM_RECORD_FILE_RECORD_ID",
table: "T_TI_INSURANCE_CLAIM_RECORD_FILE",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_RECORD_ORG_ID",
table: "T_TI_INSURANCE_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_RECORD_FILE_IMG_FILE_ID",
table: "T_TI_INSURANCE_RECORD_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_RECORD_FILE_ORG_ID",
table: "T_TI_INSURANCE_RECORD_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_RECORD_FILE_RECORD_ID",
table: "T_TI_INSURANCE_RECORD_FILE",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_USER_RECORD_ORG_ID",
table: "T_TI_INSURANCE_USER_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_USER_RECORD_RECORD_ID",
table: "T_TI_INSURANCE_USER_RECORD",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_INSURANCE_USER_RECORD_USER_ID",
table: "T_TI_INSURANCE_USER_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_DEPARTMENT_ID",
table: "T_TI_PLAN",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_ORG_ID",
table: "T_TI_PLAN",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_USER_ID",
table: "T_TI_PLAN",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_FILE_IMG_FILE_ID",
table: "T_TI_PLAN_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_FILE_ORG_ID",
table: "T_TI_PLAN_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_FILE_PLAN_ID",
table: "T_TI_PLAN_FILE",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_RANGE_ORG_ID",
table: "T_TI_PLAN_RANGE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_RANGE_PLAN_ID",
table: "T_TI_PLAN_RANGE",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_RANGE_RANGE_ID",
table: "T_TI_PLAN_RANGE",
column: "RANGE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_RANGE_TYPE_ORG_ID",
table: "T_TI_PLAN_RANGE_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_SOURCE_ORG_ID",
table: "T_TI_PLAN_SOURCE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_SOURCE_PLAN_ID",
table: "T_TI_PLAN_SOURCE",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_SOURCE_SOURCE_ID",
table: "T_TI_PLAN_SOURCE",
column: "SOURCE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PLAN_SOURCE_TYPE_ORG_ID",
table: "T_TI_PLAN_SOURCE_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_DEPARTMENT_ID",
table: "T_TI_PROJECT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MANAGER_ID",
table: "T_TI_PROJECT",
column: "MANAGER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_ORG_ID",
table: "T_TI_PROJECT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_PLAN_ID",
table: "T_TI_PROJECT",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_USER_ID",
table: "T_TI_PROJECT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_DEPARTMENT_ID",
table: "T_TI_PROJECT_CHECK",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_ORG_ID",
table: "T_TI_PROJECT_CHECK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_PROJECT_ID",
table: "T_TI_PROJECT_CHECK",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_USER_ID",
table: "T_TI_PROJECT_CHECK",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_FILE_IMG_FILE_ID",
table: "T_TI_PROJECT_CHECK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_FILE_ORG_ID",
table: "T_TI_PROJECT_CHECK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_FILE_PROJECT_CHECK_ID",
table: "T_TI_PROJECT_CHECK_FILE",
column: "PROJECT_CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_WFFILE_IMG_FILE_ID",
table: "T_TI_PROJECT_CHECK_WFFILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_WFFILE_ORG_ID",
table: "T_TI_PROJECT_CHECK_WFFILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_CHECK_WFFILE_PROJECT_CHECK_ID",
table: "T_TI_PROJECT_CHECK_WFFILE",
column: "PROJECT_CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_FILE_IMG_FILE_ID",
table: "T_TI_PROJECT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_FILE_ORG_ID",
table: "T_TI_PROJECT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_FILE_PROJECT_ID",
table: "T_TI_PROJECT_FILE",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_DEPARTMENT_ID",
table: "T_TI_PROJECT_MONEY",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_ORG_ID",
table: "T_TI_PROJECT_MONEY",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_PROJECT_ID",
table: "T_TI_PROJECT_MONEY",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_USER_ID",
table: "T_TI_PROJECT_MONEY",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_DETAIL_MONEY_ID",
table: "T_TI_PROJECT_MONEY_DETAIL",
column: "MONEY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_DETAIL_ORG_ID",
table: "T_TI_PROJECT_MONEY_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_DETAIL_FILE_DETAIL_ID",
table: "T_TI_PROJECT_MONEY_DETAIL_FILE",
column: "DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_DETAIL_FILE_IMG_FILE_ID",
table: "T_TI_PROJECT_MONEY_DETAIL_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_MONEY_DETAIL_FILE_ORG_ID",
table: "T_TI_PROJECT_MONEY_DETAIL_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_RANGE_ORG_ID",
table: "T_TI_PROJECT_RANGE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_RANGE_PROJECT_ID",
table: "T_TI_PROJECT_RANGE",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_RANGE_RANGE_ID",
table: "T_TI_PROJECT_RANGE",
column: "RANGE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_SOURCE_ORG_ID",
table: "T_TI_PROJECT_SOURCE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_SOURCE_PROJECT_ID",
table: "T_TI_PROJECT_SOURCE",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_SOURCE_SOURCE_ID",
table: "T_TI_PROJECT_SOURCE",
column: "SOURCE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_WFFILE_IMG_FILE_ID",
table: "T_TI_PROJECT_WFFILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_WFFILE_ORG_ID",
table: "T_TI_PROJECT_WFFILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_PROJECT_WFFILE_PROJECT_ID",
table: "T_TI_PROJECT_WFFILE",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_APPROVE_ID",
table: "T_TI_SAFE_PDT_COST_RECORD",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_DEPARTMENT_ID",
table: "T_TI_SAFE_PDT_COST_RECORD",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_ORG_ID",
table: "T_TI_SAFE_PDT_COST_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_USER_ID",
table: "T_TI_SAFE_PDT_COST_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_FILE_IMG_FILE_ID",
table: "T_TI_SAFE_PDT_COST_RECORD_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_FILE_ORG_ID",
table: "T_TI_SAFE_PDT_COST_RECORD_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_FILE_RECORD_ID",
table: "T_TI_SAFE_PDT_COST_RECORD_FILE",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_TYPE_COST_TYPE_ID",
table: "T_TI_SAFE_PDT_COST_RECORD_TYPE",
column: "COST_TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_TYPE_ORG_ID",
table: "T_TI_SAFE_PDT_COST_RECORD_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TI_SAFE_PDT_COST_RECORD_TYPE_RECORD_ID",
table: "T_TI_SAFE_PDT_COST_RECORD_TYPE",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_APPROVE_ID",
table: "T_TL_BACK",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_DEPARTMENT_ID",
table: "T_TL_BACK",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_ORG_ID",
table: "T_TL_BACK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_TAILING_ID",
table: "T_TL_BACK",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_USER_ID",
table: "T_TL_BACK",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_DETAIL_BACK_ID",
table: "T_TL_BACK_DETAIL",
column: "BACK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_DETAIL_ORG_ID",
table: "T_TL_BACK_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_DETAIL_USER_BACK_DETAIL_ID",
table: "T_TL_BACK_DETAIL_USER",
column: "BACK_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_DETAIL_USER_BACK_ID",
table: "T_TL_BACK_DETAIL_USER",
column: "BACK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_DETAIL_USER_ORG_ID",
table: "T_TL_BACK_DETAIL_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_DETAIL_USER_USER_ID",
table: "T_TL_BACK_DETAIL_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_FILE_BACK_ID",
table: "T_TL_BACK_FILE",
column: "BACK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_FILE_IMG_FILE_ID",
table: "T_TL_BACK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_FILE_ORG_ID",
table: "T_TL_BACK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_APPROVE_ID",
table: "T_TL_BACK_RECORD",
column: "APPROVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_DEPARTMENT_ID",
table: "T_TL_BACK_RECORD",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_ORG_ID",
table: "T_TL_BACK_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_TAILING_ID",
table: "T_TL_BACK_RECORD",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_USER_ID",
table: "T_TL_BACK_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_USER_BACK_RECORD_ID",
table: "T_TL_BACK_RECORD_USER",
column: "BACK_RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_USER_ORG_ID",
table: "T_TL_BACK_RECORD_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_RECORD_USER_USER_ID",
table: "T_TL_BACK_RECORD_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_REQUIRE_BACK_ID",
table: "T_TL_BACK_REQUIRE",
column: "BACK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_REQUIRE_ORG_ID",
table: "T_TL_BACK_REQUIRE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_BACK_REQUIRE_REQUIRE_ID",
table: "T_TL_BACK_REQUIRE",
column: "REQUIRE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_CACULATE_DEPARTMENT_ID",
table: "T_TL_CACULATE",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_CACULATE_ORG_ID",
table: "T_TL_CACULATE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_CACULATE_TAILING_ID",
table: "T_TL_CACULATE",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_CACULATE_USER_ID",
table: "T_TL_CACULATE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_CACULATE_FILE_CACULATE_ID",
table: "T_TL_CACULATE_FILE",
column: "CACULATE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_CACULATE_FILE_IMG_FILE_ID",
table: "T_TL_CACULATE_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_CACULATE_FILE_ORG_ID",
table: "T_TL_CACULATE_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_FILE_SUM_DEPARTMENT_ID",
table: "T_TL_FILE_SUM",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_FILE_SUM_ORG_ID",
table: "T_TL_FILE_SUM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_FILE_SUM_TAILING_ID",
table: "T_TL_FILE_SUM",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_FILE_SUM_USER_ID",
table: "T_TL_FILE_SUM",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_FILE_SUM_FILE_IMG_FILE_ID",
table: "T_TL_FILE_SUM_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_FILE_SUM_FILE_ORG_ID",
table: "T_TL_FILE_SUM_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_FILE_SUM_FILE_SUM_ID",
table: "T_TL_FILE_SUM_FILE",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_HIGH_CHECK_DEPARTMENT_ID",
table: "T_TL_HIGH_CHECK",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_HIGH_CHECK_ORG_ID",
table: "T_TL_HIGH_CHECK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_HIGH_CHECK_TAILING_ID",
table: "T_TL_HIGH_CHECK",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_HIGH_CHECK_USER_ID",
table: "T_TL_HIGH_CHECK",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_HIGH_CHECK_FILE_HIGH_ID",
table: "T_TL_HIGH_CHECK_FILE",
column: "HIGH_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_HIGH_CHECK_FILE_IMG_FILE_ID",
table: "T_TL_HIGH_CHECK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_HIGH_CHECK_FILE_ORG_ID",
table: "T_TL_HIGH_CHECK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_OUT_DEPARTMENT_ID",
table: "T_TL_OUT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_OUT_ORG_ID",
table: "T_TL_OUT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_OUT_TAILING_ID",
table: "T_TL_OUT",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_OUT_USER_ID",
table: "T_TL_OUT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_OUT_FILE_IMG_FILE_ID",
table: "T_TL_OUT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_OUT_FILE_ORG_ID",
table: "T_TL_OUT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_OUT_FILE_OUT_ID",
table: "T_TL_OUT_FILE",
column: "OUT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PLAN_SET_DEPARTMENT_ID",
table: "T_TL_PLAN_SET",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PLAN_SET_ORG_ID",
table: "T_TL_PLAN_SET",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PLAN_SET_POST_ID",
table: "T_TL_PLAN_SET",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_FINISH_DEPARTMENT_ID",
table: "T_TL_PROJECT_FINISH",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_FINISH_ORG_ID",
table: "T_TL_PROJECT_FINISH",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_FINISH_TAILING_ID",
table: "T_TL_PROJECT_FINISH",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_FINISH_USER_ID",
table: "T_TL_PROJECT_FINISH",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_FINISH_FILE_HIGHT_ID",
table: "T_TL_PROJECT_FINISH_FILE",
column: "HIGHT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_FINISH_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_FINISH_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_FINISH_FILE_ORG_ID",
table: "T_TL_PROJECT_FINISH_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_HIGHT_DEPARTMENT_ID",
table: "T_TL_PROJECT_HIGHT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_HIGHT_ORG_ID",
table: "T_TL_PROJECT_HIGHT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_HIGHT_TAILING_ID",
table: "T_TL_PROJECT_HIGHT",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_HIGHT_USER_ID",
table: "T_TL_PROJECT_HIGHT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_HIGHT_FILE_HIGHT_ID",
table: "T_TL_PROJECT_HIGHT_FILE",
column: "HIGHT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_HIGHT_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_HIGHT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_HIGHT_FILE_ORG_ID",
table: "T_TL_PROJECT_HIGHT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_INTRODUCE_DEPARTMENT_ID",
table: "T_TL_PROJECT_INTRODUCE",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_INTRODUCE_ORG_ID",
table: "T_TL_PROJECT_INTRODUCE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_INTRODUCE_TAILING_ID",
table: "T_TL_PROJECT_INTRODUCE",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_INTRODUCE_USER_ID",
table: "T_TL_PROJECT_INTRODUCE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_INTRODUCE_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_INTRODUCE_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_INTRODUCE_FILE_INTRODUCE_ID",
table: "T_TL_PROJECT_INTRODUCE_FILE",
column: "INTRODUCE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_INTRODUCE_FILE_ORG_ID",
table: "T_TL_PROJECT_INTRODUCE_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_DEPARTMENT_ID",
table: "T_TL_PROJECT_RECORD",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_ORG_ID",
table: "T_TL_PROJECT_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_TAILING_ID",
table: "T_TL_PROJECT_RECORD",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_USER_ID",
table: "T_TL_PROJECT_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_CHECK_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_RECORD_CHECK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_CHECK_FILE_ORG_ID",
table: "T_TL_PROJECT_RECORD_CHECK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_CHECK_FILE_PROJECT_ID",
table: "T_TL_PROJECT_RECORD_CHECK_FILE",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_RECORD_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_FILE_ORG_ID",
table: "T_TL_PROJECT_RECORD_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_FILE_PROJECT_ID",
table: "T_TL_PROJECT_RECORD_FILE",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_WATCH_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_RECORD_WATCH_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_WATCH_FILE_ORG_ID",
table: "T_TL_PROJECT_RECORD_WATCH_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_RECORD_WATCH_FILE_PROJECT_ID",
table: "T_TL_PROJECT_RECORD_WATCH_FILE",
column: "PROJECT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_DEPARTMENT_ID",
table: "T_TL_PROJECT_SLOPEBANK",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_ORG_ID",
table: "T_TL_PROJECT_SLOPEBANK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_TAILING_ID",
table: "T_TL_PROJECT_SLOPEBANK",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_USER_ID",
table: "T_TL_PROJECT_SLOPEBANK",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_SLOPEBANK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_FILE_ORG_ID",
table: "T_TL_PROJECT_SLOPEBANK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_FILE_SLOPEBANK_ID",
table: "T_TL_PROJECT_SLOPEBANK_FILE",
column: "SLOPEBANK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_PROJ_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_SLOPEBANK_PROJ_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_PROJ_FILE_ORG_ID",
table: "T_TL_PROJECT_SLOPEBANK_PROJ_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_PROJ_FILE_SLOPEBANK_ID",
table: "T_TL_PROJECT_SLOPEBANK_PROJ_FILE",
column: "SLOPEBANK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_SUB_FILE_IMG_FILE_ID",
table: "T_TL_PROJECT_SLOPEBANK_SUB_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_SUB_FILE_ORG_ID",
table: "T_TL_PROJECT_SLOPEBANK_SUB_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_PROJECT_SLOPEBANK_SUB_FILE_SLOPEBANK_ID",
table: "T_TL_PROJECT_SLOPEBANK_SUB_FILE",
column: "SLOPEBANK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_QUALITY_CHECK_DEPARTMENT_ID",
table: "T_TL_QUALITY_CHECK",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_QUALITY_CHECK_ORG_ID",
table: "T_TL_QUALITY_CHECK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_QUALITY_CHECK_TAILING_ID",
table: "T_TL_QUALITY_CHECK",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_QUALITY_CHECK_USER_ID",
table: "T_TL_QUALITY_CHECK",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_QUALITY_CHECK_FILE_IMG_FILE_ID",
table: "T_TL_QUALITY_CHECK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_QUALITY_CHECK_FILE_ORG_ID",
table: "T_TL_QUALITY_CHECK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_QUALITY_CHECK_FILE_QUALITY_ID",
table: "T_TL_QUALITY_CHECK_FILE",
column: "QUALITY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_REQUIRE_ORG_ID",
table: "T_TL_REQUIRE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_TAILING_ORG_ID",
table: "T_TL_TAILING",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_ORG_ID",
table: "T_TL_WATCH_DAYLY",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_SUM_ID",
table: "T_TL_WATCH_DAYLY",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_TAILING_ID",
table: "T_TL_WATCH_DAYLY",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_USER_ID",
table: "T_TL_WATCH_DAYLY",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_DETAIL_DAYLY_ID",
table: "T_TL_WATCH_DAYLY_DETAIL",
column: "DAYLY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_DETAIL_ORG_ID",
table: "T_TL_WATCH_DAYLY_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_DETAIL_SUM_ID",
table: "T_TL_WATCH_DAYLY_DETAIL",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_DETAIL_TAILING_ID",
table: "T_TL_WATCH_DAYLY_DETAIL",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_DETAIL_USER_DAYLY_DETAIL_ID",
table: "T_TL_WATCH_DAYLY_DETAIL_USER",
column: "DAYLY_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_DETAIL_USER_ORG_ID",
table: "T_TL_WATCH_DAYLY_DETAIL_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_DAYLY_DETAIL_USER_USER_ID",
table: "T_TL_WATCH_DAYLY_DETAIL_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_ORG_ID",
table: "T_TL_WATCH_LINE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_SUM_ID",
table: "T_TL_WATCH_LINE",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_TAILING_ID",
table: "T_TL_WATCH_LINE",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_USER_ID",
table: "T_TL_WATCH_LINE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_LINE_ID",
table: "T_TL_WATCH_LINE_DETAIL",
column: "LINE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_ORG_ID",
table: "T_TL_WATCH_LINE_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_SUM_ID",
table: "T_TL_WATCH_LINE_DETAIL",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_TAILING_ID",
table: "T_TL_WATCH_LINE_DETAIL",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_WATCH_LINE_POINT_ID",
table: "T_TL_WATCH_LINE_DETAIL",
column: "WATCH_LINE_POINT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_USER_LINE_DETAIL_ID",
table: "T_TL_WATCH_LINE_DETAIL_USER",
column: "LINE_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_USER_ORG_ID",
table: "T_TL_WATCH_LINE_DETAIL_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_DETAIL_USER_USER_ID",
table: "T_TL_WATCH_LINE_DETAIL_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_POINT_ORG_ID",
table: "T_TL_WATCH_LINE_POINT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_LINE_POINT_TAILING_ID",
table: "T_TL_WATCH_LINE_POINT",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_ORG_ID",
table: "T_TL_WATCH_MOVE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_SUM_ID",
table: "T_TL_WATCH_MOVE",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_TAILING_ID",
table: "T_TL_WATCH_MOVE",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_USER_ID",
table: "T_TL_WATCH_MOVE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_MOVE_ID",
table: "T_TL_WATCH_MOVE_DETAIL",
column: "MOVE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_ORG_ID",
table: "T_TL_WATCH_MOVE_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_SUM_ID",
table: "T_TL_WATCH_MOVE_DETAIL",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_TAILING_ID",
table: "T_TL_WATCH_MOVE_DETAIL",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_WATCH_MOVE_POINT_ID",
table: "T_TL_WATCH_MOVE_DETAIL",
column: "WATCH_MOVE_POINT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_USER_MOVE_DETAIL_ID",
table: "T_TL_WATCH_MOVE_DETAIL_USER",
column: "MOVE_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_USER_ORG_ID",
table: "T_TL_WATCH_MOVE_DETAIL_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_DETAIL_USER_USER_ID",
table: "T_TL_WATCH_MOVE_DETAIL_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_POINT_ORG_ID",
table: "T_TL_WATCH_MOVE_POINT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_MOVE_POINT_TAILING_ID",
table: "T_TL_WATCH_MOVE_POINT",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_ORG_ID",
table: "T_TL_WATCH_PERCENT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_SUM_ID",
table: "T_TL_WATCH_PERCENT",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_TAILING_ID",
table: "T_TL_WATCH_PERCENT",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_USER_ID",
table: "T_TL_WATCH_PERCENT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_DETAIL_ORG_ID",
table: "T_TL_WATCH_PERCENT_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_DETAIL_PERCENT_ID",
table: "T_TL_WATCH_PERCENT_DETAIL",
column: "PERCENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_DETAIL_SUM_ID",
table: "T_TL_WATCH_PERCENT_DETAIL",
column: "SUM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_DETAIL_TAILING_ID",
table: "T_TL_WATCH_PERCENT_DETAIL",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_DETAIL_USER_ORG_ID",
table: "T_TL_WATCH_PERCENT_DETAIL_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_DETAIL_USER_PERCENT_DETAIL_ID",
table: "T_TL_WATCH_PERCENT_DETAIL_USER",
column: "PERCENT_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PERCENT_DETAIL_USER_USER_ID",
table: "T_TL_WATCH_PERCENT_DETAIL_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PLAN_SET_DEPARTMENT_ID",
table: "T_TL_WATCH_PLAN_SET",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PLAN_SET_ORG_ID",
table: "T_TL_WATCH_PLAN_SET",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PLAN_SET_POST_ID",
table: "T_TL_WATCH_PLAN_SET",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_PLAN_SET_TAILING_ID",
table: "T_TL_WATCH_PLAN_SET",
column: "TAILING_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_SUM_ORG_ID",
table: "T_TL_WATCH_SUM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_TL_WATCH_SUM_TAILING_ID",
table: "T_TL_WATCH_SUM",
column: "TAILING_ID");
migrationBuilder.AddForeignKey(
name: "FK_T_CM_RSP_ESTIMATE_T_AE_ACCIDENT_EVENT_REPORT_EVENT_ID",
table: "T_CM_RSP_ESTIMATE",
column: "EVENT_ID",
principalTable: "T_AE_ACCIDENT_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_T_CM_RSP_ESTIMATE_T_AE_ACCIDENT_TYPE_ACCIDENT_TYPE_ID",
table: "T_CM_RSP_ESTIMATE",
column: "ACCIDENT_TYPE_ID",
principalTable: "T_AE_ACCIDENT_TYPE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_T_CM_RSP_ESTIMATE_EVENT_KIND_T_AE_ACCIDENT_KIND_KIND_ID",
table: "T_CM_RSP_ESTIMATE_EVENT_KIND",
column: "KIND_ID",
principalTable: "T_AE_ACCIDENT_KIND",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
}
}
}