mh_sms/APT.Data.Migrations/Migrations/20240126062023_wjn202401-2601.cs
2024-01-26 15:53:20 +08:00

3663 lines
208 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wjn2024012601 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_OPINION");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE");
migrationBuilder.DropTable(
name: "T_OG_EVENT_GET_DETAIL_FILE");
migrationBuilder.DropTable(
name: "T_OG_EVENT_GET_DETAIL_ITEM");
migrationBuilder.DropTable(
name: "T_OG_EVENT_REPORT_FILE");
migrationBuilder.DropTable(
name: "T_OG_EVENT_REPORT_SUM");
migrationBuilder.DropTable(
name: "T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE");
migrationBuilder.DropTable(
name: "T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE");
migrationBuilder.DropTable(
name: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE");
migrationBuilder.DropTable(
name: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE");
migrationBuilder.DropTable(
name: "T_OG_INNER_CONTACT_DO_FILE");
migrationBuilder.DropTable(
name: "T_OG_INNER_CONTACT_ITEM_FILE");
migrationBuilder.DropTable(
name: "T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER");
migrationBuilder.DropTable(
name: "T_OG_POLICY_DOCUMENT_DETAIL_FILE");
migrationBuilder.DropTable(
name: "T_OG_POLICY_DOCUMENT_TYPE");
migrationBuilder.DropTable(
name: "T_OG_SAFE_ASSESS_RECORD_ITEM");
migrationBuilder.DropTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT");
migrationBuilder.DropTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE");
migrationBuilder.DropTable(
name: "T_OG_SAFE_PDT_SIGNED_POST");
migrationBuilder.DropTable(
name: "T_OG_STANDARDIZATION_ACTION_PLAN_REL");
migrationBuilder.DropTable(
name: "T_OG_STANDARDIZATION_PERSON_REL");
migrationBuilder.DropTable(
name: "T_OG_STANDARDIZATION_REVIEW_ITEMS_REL");
migrationBuilder.DropTable(
name: "T_OG_STANDARDIZATION_REVIEW_RESULT_REL");
migrationBuilder.DropTable(
name: "T_OG_APPROVE_REWARD_PUNISHMENT_REPORT");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_OPINION_REPORT");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT");
migrationBuilder.DropTable(
name: "T_OG_EVENT_GET_DETAIL");
migrationBuilder.DropTable(
name: "T_OG_EVENT_REPORT");
migrationBuilder.DropTable(
name: "T_OG_EXTERNAL_COMPLAIN_ADVISE");
migrationBuilder.DropTable(
name: "T_OG_EXTERNAL_CONTACT_COMMUNICATE");
migrationBuilder.DropTable(
name: "T_OG_INNER_CONTACT");
migrationBuilder.DropTable(
name: "T_OG_POLICY_DOCUMENT_DETAIL");
migrationBuilder.DropTable(
name: "T_OG_SAFE_ASSESS_ITEM");
migrationBuilder.DropTable(
name: "T_OG_SAFE_ASSESS_RECORD_DETAIL");
migrationBuilder.DropTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL");
migrationBuilder.DropTable(
name: "T_OG_SAFE_PDT_SIGNED");
migrationBuilder.DropTable(
name: "T_OG_STANDARDIZATION_ACTION_PLAN_ENUM");
migrationBuilder.DropTable(
name: "T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM");
migrationBuilder.DropTable(
name: "T_OG_STANDARDIZATION_SYSTEM_REVIEW");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_OPINION_COLLECTION");
migrationBuilder.DropTable(
name: "T_OG_EVENT_GET");
migrationBuilder.DropTable(
name: "T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM");
migrationBuilder.DropTable(
name: "T_OG_POLICY_DOCUMENT");
migrationBuilder.DropTable(
name: "T_OG_SAFE_ASSESS_PLAN_INPUT");
migrationBuilder.DropTable(
name: "T_OG_SAFE_ASSESS_RECORD");
migrationBuilder.DropTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "T_OG_APPROVE_REWARD_PUNISHMENT_REPORT",
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),
IDENTIFY_APPROVE = 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),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
START_TIME = table.Column<DateTime>(type: "datetime2", 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_OG_APPROVE_REWARD_PUNISHMENT_REPORT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_APPROVE_REWARD_PUNISHMENT_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_OG_APPROVE_REWARD_PUNISHMENT_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_OG_APPROVE_REWARD_PUNISHMENT_REPORT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM",
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_OG_EMPLOYEE_ITEM_CATEGORY_ENUM", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_OPINION_COLLECTION",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AH_CHARGE_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CHARGE_USER_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),
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),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
START_TIME = table.Column<DateTime>(type: "datetime2", 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_OG_EMPLOYEE_OPINION_COLLECTION", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_T_FM_USER_AH_CHARGE_USER_ID",
column: x => x.AH_CHARGE_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_T_FM_USER_CHARGE_USER_ID",
column: x => x.CHARGE_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EVENT_GET",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
BACK = table.Column<bool>(type: "bit", 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),
END_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EVENT_COMPARE = table.Column<int>(type: "int", nullable: false),
EVENT_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),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LAST_EVENT_COUNT = 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),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
START_TIME = table.Column<DateTime>(type: "datetime2", 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_OG_EVENT_GET", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EVENT_REPORT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AGREE = table.Column<bool>(type: "bit", nullable: false),
AH_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
COMMENT = 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),
DESC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DO_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DO_DESC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DO_TYPE = table.Column<int>(type: "int", nullable: false),
DO_USER_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),
HAPPEN_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),
PLACE = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
TYPE = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EVENT_REPORT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_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_OG_EVENT_REPORT_T_FM_DEPARTMENT_DO_DEPARTMENT_ID",
column: x => x.DO_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_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_OG_EVENT_REPORT_T_FM_USER_AH_USER_ID",
column: x => x.AH_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_REPORT_T_FM_USER_DO_USER_ID",
column: x => x.DO_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_REPORT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EVENT_REPORT_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: false),
SUM_YEAR = table.Column<int>(type: "int", nullable: false),
TIME = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EVENT_REPORT_SUM", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EVENT_REPORT_SUM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
COMMUNICATE_DES = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
COMMUNICATE_NAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
COMMUNICATE_PURPOSE = 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),
DO_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DO_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXTERNAL_COMMUNICATE_PERSON = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
EXTERNAL_COMPANY_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),
IMPLEMENT_DESCRIPTION = 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),
START_TIME = table.Column<DateTime>(type: "datetime2", 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_OG_EXTERNAL_CONTACT_COMMUNICATE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_T_FM_DEPARTMENT_DO_DEPARTMENT_ID",
column: x => x.DO_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_T_FM_USER_DO_USER_ID",
column: x => x.DO_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_T_OG_EXTERNAL_CONTACT_DETAIL_EXTERNAL_COMPANY_ID",
column: x => x.EXTERNAL_COMPANY_ID,
principalTable: "T_OG_EXTERNAL_CONTACT_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_INNER_CONTACT",
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),
DESC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DO_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DO_DESC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DO_USER_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_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FORM_USER_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
FROM_USER_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),
PURPOSE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TO_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TO_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TO_USER_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_INNER_CONTACT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_DEPARTMENT_DO_DEPARTMENT_ID",
column: x => x.DO_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_DEPARTMENT_FORM_DEPARTMENT_ID",
column: x => x.FORM_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_DEPARTMENT_TO_DEPARTMENT_ID",
column: x => x.TO_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_USER_DO_USER_ID",
column: x => x.DO_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_USER_FROM_USER_ID",
column: x => x.FROM_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_USER_TO_USER_ID",
column: x => x.TO_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_POLICY_DOCUMENT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPOINT_AGREEUSER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
APPOINT_EFFECT_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
APPOINT_REASON = table.Column<int>(type: "int", nullable: false),
APPOINT_TYPE = 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: 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(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PUBLISH_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
VERSION = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_POLICY_DOCUMENT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_T_FM_USER_APPOINT_AGREEUSER_ID",
column: x => x.APPOINT_AGREEUSER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_T_OG_PERSONNEL_TYPE_ENUM_APPOINT_TYPE",
column: x => x.APPOINT_TYPE,
principalTable: "T_OG_PERSONNEL_TYPE_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_POLICY_DOCUMENT_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_OG_POLICY_DOCUMENT_TYPE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_TYPE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_ASSESS_RECORD",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ANNUAL = 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),
CYCLE = table.Column<int>(type: "int", nullable: false),
CYCLE_NAME = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DEPARTMENT_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),
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_OG_SAFE_ASSESS_RECORD", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_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_OG_SAFE_ASSESS_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_OG_SAFE_ASSESS_RECORD_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ANNUAL = 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),
LEVEL = 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),
NAME = table.Column<string>(type: "nvarchar(50)", maxLength: 50, 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_OG_SAFE_PDT_ASSESS_PLAN_CHECK", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_ASSESS_PLAN_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_OG_SAFE_PDT_ASSESS_PLAN_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_OG_SAFE_PDT_ASSESS_PLAN_CHECK_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_PDT_SIGNED",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ANNUAL = table.Column<int>(type: "int", nullable: false),
CHARGE_USER_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),
FILE_CONTENT = table.Column<string>(type: "nvarchar(max)", maxLength: 5000, nullable: true),
FILE_NAME = 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),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
Nav_CreateUserID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
STANDARD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
TRIGGER_TYPE = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_PDT_SIGNED", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_T_FM_USER_CHARGE_USER_ID",
column: x => x.CHARGE_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_T_FM_USER_Nav_CreateUserID",
column: x => x.Nav_CreateUserID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_T_SC_STANDARD_CREATE_STANDARD_ID",
column: x => x.STANDARD_ID,
principalTable: "T_SC_STANDARD_CREATE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_STANDARDIZATION_ACTION_PLAN_ENUM",
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_OG_STANDARDIZATION_ACTION_PLAN_ENUM", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_ACTION_PLAN_ENUM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM",
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_OG_STANDARDIZATION_REVIEW_ITEM_ENUM", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
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),
HOST_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),
REVIEW_TIME = table.Column<DateTime>(type: "datetime2", 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_OG_STANDARDIZATION_SYSTEM_REVIEW", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_SYSTEM_REVIEW_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_SYSTEM_REVIEW_T_FM_USER_HOST_ID",
column: x => x.HOST_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_SYSTEM_REVIEW_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_APPROVE_REWARD_PUNISHMENT_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),
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),
OBJECT = table.Column<int>(type: "int", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REASON_DESCRIBE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
REASON_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
REPORT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TYPE = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_APPROVE_REWARD_PUNISHMENT_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_OG_APPROVE_REWARD_PUNISHMENT_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_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_T_OG_APPROVE_REWARD_PUNISHMENT_REASON_REASON_ID",
column: x => x.REASON_ID,
principalTable: "T_OG_APPROVE_REWARD_PUNISHMENT_REASON",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_T_OG_APPROVE_REWARD_PUNISHMENT_REPORT_REPORT_ID",
column: x => x.REPORT_ID,
principalTable: "T_OG_APPROVE_REWARD_PUNISHMENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_OPINION_REPORT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ASSIGNEE_DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ASSIGNEE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ASSIGNEE_STATUS = 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),
DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DO_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DO_USER_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),
IMPLEMENT_DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LAUNCH_DEPARTMENT_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),
NAME = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SATISFACTION_STATUS = table.Column<int>(type: "int", nullable: false),
START_TIME = table.Column<DateTime>(type: "datetime2", 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)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EMPLOYEE_OPINION_REPORT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_REPORT_T_FM_DEPARTMENT_DO_DEPARTMENT_ID",
column: x => x.DO_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_REPORT_T_FM_DEPARTMENT_LAUNCH_DEPARTMENT_ID",
column: x => x.LAUNCH_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_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_OG_EMPLOYEE_OPINION_REPORT_T_FM_USER_ASSIGNEE_ID",
column: x => x.ASSIGNEE_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_REPORT_T_FM_USER_DO_USER_ID",
column: x => x.DO_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_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_OG_EMPLOYEE_OPINION_REPORT_T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM_TYPE_ID",
column: x => x.TYPE_ID,
principalTable: "T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ASSIGNEE_DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ASSIGNEE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ASSIGNEE_STATUS = 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),
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),
IMPLEMENT_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IMPLEMENT_DESCRIPTION = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
IMPLEMENT_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
LAUNCH_DEPARTMENT_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),
NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SATISFACTION_STATUS = table.Column<int>(type: "int", nullable: false),
START_TIME = table.Column<DateTime>(type: "datetime2", 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)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_T_FM_DEPARTMENT_IMPLEMENT_DEPARTMENT_ID",
column: x => x.IMPLEMENT_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_T_FM_DEPARTMENT_LAUNCH_DEPARTMENT_ID",
column: x => x.LAUNCH_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_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_OG_EMPLOYEE_REFUSE_ITEM_REPORT_T_FM_USER_ASSIGNEE_ID",
column: x => x.ASSIGNEE_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_T_FM_USER_IMPLEMENT_USER_ID",
column: x => x.IMPLEMENT_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_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_OG_EMPLOYEE_REFUSE_ITEM_REPORT_T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM_TYPE_ID",
column: x => x.TYPE_ID,
principalTable: "T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ASSIGNEE_DESCRIPTION = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ASSIGNEE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ASSIGNEE_STATUS = 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),
DESCRIPTION = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
EXTERNAL_COMPANY_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),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
NAME = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SATISFACTION_STATUS = table.Column<int>(type: "int", nullable: false),
START_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
SURVEY_DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SURVEY_DESCRIPTION = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
SURVEY_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EXTERNAL_COMPLAIN_ADVISE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_FM_DEPARTMENT_SURVEY_DEPARTMENT_ID",
column: x => x.SURVEY_DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_FM_USER_ASSIGNEE_ID",
column: x => x.ASSIGNEE_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_FM_USER_SURVEY_USER_ID",
column: x => x.SURVEY_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM_TYPE_ID",
column: x => x.TYPE_ID,
principalTable: "T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_T_OG_EXTERNAL_CONTACT_DETAIL_EXTERNAL_COMPANY_ID",
column: x => x.EXTERNAL_COMPANY_ID,
principalTable: "T_OG_EXTERNAL_CONTACT_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
COLLECTION_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),
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),
REFUSE_DESCRIPTION = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
RESULT = table.Column<int>(type: "int", 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_OG_EMPLOYEE_OPINION_COLLECTION_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_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_OG_EMPLOYEE_OPINION_COLLECTION_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_OG_EMPLOYEE_OPINION_COLLECTION_USER_T_OG_EMPLOYEE_OPINION_COLLECTION_COLLECTION_ID",
column: x => x.COLLECTION_ID,
principalTable: "T_OG_EMPLOYEE_OPINION_COLLECTION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EVENT_GET_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),
EVENT_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),
REPLY_USER_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)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EVENT_GET_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_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_OG_EVENT_GET_DETAIL_T_FM_USER_REPLY_USER_ID",
column: x => x.REPLY_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_DETAIL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_DETAIL_T_OG_EVENT_GET_EVENT_ID",
column: x => x.EVENT_ID,
principalTable: "T_OG_EVENT_GET",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_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_OG_EVENT_REPORT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_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_OG_EVENT_REPORT_FILE_T_OG_EVENT_REPORT_REPORT_ID",
column: x => x.REPORT_ID,
principalTable: "T_OG_EVENT_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_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_OG_EXTERNAL_CONTACT_COMMUNICATE_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),
EXTERNAL_CONTACT_COMMUNICATE_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_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_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_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE_T_OG_EXTERNAL_CONTACT_COMMUNICATE_EXTERNAL_CONTACT_COMMUNICATE_ID",
column: x => x.EXTERNAL_CONTACT_COMMUNICATE_ID,
principalTable: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_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_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_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),
EXTERNAL_CONTACT_COMMUNICATE_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_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_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_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE_T_OG_EXTERNAL_CONTACT_COMMUNICATE_EXTERNAL_CONTACT_COMMUNICATE_ID",
column: x => x.EXTERNAL_CONTACT_COMMUNICATE_ID,
principalTable: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_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_OG_INNER_CONTACT_DO_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CONTACT_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_OG_INNER_CONTACT_DO_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_DO_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_OG_INNER_CONTACT_DO_FILE_T_OG_INNER_CONTACT_CONTACT_ID",
column: x => x.CONTACT_ID,
principalTable: "T_OG_INNER_CONTACT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_DO_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_OG_INNER_CONTACT_ITEM_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CONTACT_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_OG_INNER_CONTACT_ITEM_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_ITEM_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_OG_INNER_CONTACT_ITEM_FILE_T_OG_INNER_CONTACT_CONTACT_ID",
column: x => x.CONTACT_ID,
principalTable: "T_OG_INNER_CONTACT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_INNER_CONTACT_ITEM_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_OG_POLICY_DOCUMENT_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
APPOINT_AGREEUSER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
APPOINT_EFFECT_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
APPOINT_REASON = table.Column<int>(type: "int", nullable: false),
APPOINT_TYPE = 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: 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(500)", maxLength: 500, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POLICY_DOCUMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PUBLISH_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
STATUS = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
VERSION = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_POLICY_DOCUMENT_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_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_OG_POLICY_DOCUMENT_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_OG_POLICY_DOCUMENT_DETAIL_T_FM_USER_APPOINT_AGREEUSER_ID",
column: x => x.APPOINT_AGREEUSER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_DETAIL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_DETAIL_T_OG_PERSONNEL_TYPE_ENUM_APPOINT_TYPE",
column: x => x.APPOINT_TYPE,
principalTable: "T_OG_PERSONNEL_TYPE_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_DETAIL_T_OG_POLICY_DOCUMENT_POLICY_DOCUMENT_ID",
column: x => x.POLICY_DOCUMENT_ID,
principalTable: "T_OG_POLICY_DOCUMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_ASSESS_RECORD_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),
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: true),
REWARD_PUNISHMENT_MEASURES = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
SAFE_ASSESS_RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_ASSESS_RECORD_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_RECORD_DETAIL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_RECORD_DETAIL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_RECORD_DETAIL_T_OG_SAFE_ASSESS_RECORD_SAFE_ASSESS_RECORD_ID",
column: x => x.SAFE_ASSESS_RECORD_ID,
principalTable: "T_OG_SAFE_ASSESS_RECORD",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_RECORD_DETAIL_T_SC_POST_POST_ID",
column: x => x.POST_ID,
principalTable: "T_SC_POST",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_ASSESS_PLAN_INPUT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ANNUAL = table.Column<int>(type: "int", nullable: false),
CHECK_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CODE = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
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),
DEP_NAME = table.Column<string>(type: "nvarchar(100)", maxLength: 100, 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(100)", maxLength: 100, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
POST_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)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_ASSESS_PLAN_INPUT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_PLAN_INPUT_T_FM_DEPARTMENT_DEPARTMENT_ID",
column: x => x.DEPARTMENT_ID,
principalTable: "T_FM_DEPARTMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_PLAN_INPUT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_PLAN_INPUT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_PLAN_INPUT_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_CHECK_ID",
column: x => x.CHECK_ID,
principalTable: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_PLAN_INPUT_T_SC_POST_POST_ID",
column: x => x.POST_ID,
principalTable: "T_SC_POST",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ANNUAL = table.Column<int>(type: "int", nullable: false),
CHECK_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),
CYCLE = 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),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_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_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_CHECK_ID",
column: x => x.CHECK_ID,
principalTable: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_T_SC_POST_POST_ID",
column: x => x.POST_ID,
principalTable: "T_SC_POST",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_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: 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_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_ASSESS_PLAN_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_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_CHECK_ID",
column: x => x.CHECK_ID,
principalTable: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_ASSESS_PLAN_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_OG_SAFE_PDT_SIGNED_POST",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHARGE_DEAL_STATUS = table.Column<int>(type: "int", nullable: false),
CHARGE_SIGNED_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CHARGE_USER_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),
DEAL_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),
POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SAFE_PDT_SIGNED_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SIGNED_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_PDT_SIGNED_POST", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_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_OG_SAFE_PDT_SIGNED_POST_T_FM_USER_CHARGE_USER_ID",
column: x => x.CHARGE_USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_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_OG_SAFE_PDT_SIGNED_POST_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_SIGNED_POST_T_OG_SAFE_PDT_SIGNED_SAFE_PDT_SIGNED_ID",
column: x => x.SAFE_PDT_SIGNED_ID,
principalTable: "T_OG_SAFE_PDT_SIGNED",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_STANDARDIZATION_ACTION_PLAN_REL",
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),
IMPLEMENTATION = 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),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PLAN_CONTENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REVIEW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_STANDARDIZATION_ACTION_PLAN_REL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_ACTION_PLAN_REL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_ACTION_PLAN_REL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_ACTION_PLAN_REL_T_OG_STANDARDIZATION_ACTION_PLAN_ENUM_PLAN_ID",
column: x => x.PLAN_ID,
principalTable: "T_OG_STANDARDIZATION_ACTION_PLAN_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_ACTION_PLAN_REL_T_OG_STANDARDIZATION_SYSTEM_REVIEW_REVIEW_ID",
column: x => x.REVIEW_ID,
principalTable: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_STANDARDIZATION_PERSON_REL",
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),
REVIEW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_STANDARDIZATION_PERSON_REL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_PERSON_REL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_PERSON_REL_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_PERSON_REL_T_OG_STANDARDIZATION_SYSTEM_REVIEW_REVIEW_ID",
column: x => x.REVIEW_ID,
principalTable: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_STANDARDIZATION_REVIEW_ITEMS_REL",
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),
ITEM_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),
PROBLEM = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
REVIEW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_STANDARDIZATION_REVIEW_ITEMS_REL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_REVIEW_ITEMS_REL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_REVIEW_ITEMS_REL_T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM_ITEM_ID",
column: x => x.ITEM_ID,
principalTable: "T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_REVIEW_ITEMS_REL_T_OG_STANDARDIZATION_SYSTEM_REVIEW_REVIEW_ID",
column: x => x.REVIEW_ID,
principalTable: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_STANDARDIZATION_REVIEW_RESULT_REL",
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),
RESULT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
RESULT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REVIEW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_STANDARDIZATION_REVIEW_RESULT_REL", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_REVIEW_RESULT_REL_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_REVIEW_RESULT_REL_T_OG_STANDARDIZATION_REVIEW_RESULT_ENUM_RESULT_ID",
column: x => x.RESULT_ID,
principalTable: "T_OG_STANDARDIZATION_REVIEW_RESULT_ENUM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_STANDARDIZATION_REVIEW_RESULT_REL_T_OG_STANDARDIZATION_SYSTEM_REVIEW_REVIEW_ID",
column: x => x.REVIEW_ID,
principalTable: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_OPINION_IMPLEMENT_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),
EMPLOYEE_OPINION_REPORT_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),
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_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE_T_OG_EMPLOYEE_OPINION_REPORT_EMPLOYEE_OPINION_REPORT_ID",
column: x => x.EMPLOYEE_OPINION_REPORT_ID,
principalTable: "T_OG_EMPLOYEE_OPINION_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
column: x => x.IMG_FILE_ID,
principalTable: "T_PF_IMG_FILE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_OPINION_SUGGESTION_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),
EMPLOYEE_OPINION_REPORT_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),
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_OG_EMPLOYEE_OPINION_SUGGESTION_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_SUGGESTION_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_OG_EMPLOYEE_OPINION_SUGGESTION_FILE_T_OG_EMPLOYEE_OPINION_REPORT_EMPLOYEE_OPINION_REPORT_ID",
column: x => x.EMPLOYEE_OPINION_REPORT_ID,
principalTable: "T_OG_EMPLOYEE_OPINION_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_SUGGESTION_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_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_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),
EMPLOYEE_REFUSE_ITEM_REPORT_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_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_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_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_EMPLOYEE_REFUSE_ITEM_REPORT_ID",
column: x => x.EMPLOYEE_REFUSE_ITEM_REPORT_ID,
principalTable: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_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_OG_EMPLOYEE_REFUSE_ITEM_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),
EMPLOYEE_REFUSE_ITEM_REPORT_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_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_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_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_EMPLOYEE_REFUSE_ITEM_REPORT_ID",
column: x => x.EMPLOYEE_REFUSE_ITEM_REPORT_ID,
principalTable: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_REFUSE_ITEM_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_OG_EXTERNAL_COMPLAIN_ADVISE_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),
EXTERNAL_COMPLAIN_ADVISE_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_OG_EXTERNAL_COMPLAIN_ADVISE_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_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_OG_EXTERNAL_COMPLAIN_ADVISE_FILE_T_OG_EXTERNAL_COMPLAIN_ADVISE_EXTERNAL_COMPLAIN_ADVISE_ID",
column: x => x.EXTERNAL_COMPLAIN_ADVISE_ID,
principalTable: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_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_OG_EXTERNAL_COMPLAIN_ADVISE_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),
EXTERNAL_COMPLAIN_ADVISE_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_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_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_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE_T_OG_EXTERNAL_COMPLAIN_ADVISE_EXTERNAL_COMPLAIN_ADVISE_ID",
column: x => x.EXTERNAL_COMPLAIN_ADVISE_ID,
principalTable: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EXTERNAL_COMPLAIN_ADVISE_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_OG_EMPLOYEE_OPINION",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
COLLECTION_USER_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),
OPINION_CONTENT = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
REFUSE_DESCRIPTION = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
RESULT = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EMPLOYEE_OPINION", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_COLLECTION_USER_ID",
column: x => x.COLLECTION_USER_ID,
principalTable: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
COLLECTION_USER_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_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_COLLECTION_USER_ID",
column: x => x.COLLECTION_USER_ID,
principalTable: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
column: x => x.IMG_FILE_ID,
principalTable: "T_PF_IMG_FILE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EVENT_GET_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_OG_EVENT_GET_DETAIL_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_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_OG_EVENT_GET_DETAIL_FILE_T_OG_EVENT_GET_DETAIL_DETAIL_ID",
column: x => x.DETAIL_ID,
principalTable: "T_OG_EVENT_GET_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_DETAIL_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
column: x => x.IMG_FILE_ID,
principalTable: "T_PF_IMG_FILE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_EVENT_GET_DETAIL_ITEM",
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),
DESC = table.Column<string>(type: "nvarchar(500)", maxLength: 500, 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),
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),
REPLY = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
TYPE = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_EVENT_GET_DETAIL_ITEM", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_DETAIL_ITEM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_EVENT_GET_DETAIL_ITEM_T_OG_EVENT_GET_DETAIL_DETAIL_ID",
column: x => x.DETAIL_ID,
principalTable: "T_OG_EVENT_GET_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_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),
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),
POLICY_DOCUMENT_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
T_OG_POLICY_DOCUMENTID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_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_OG_POLICY_DOCUMENT_DETAIL_APPOINT_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_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER_T_OG_POLICY_DOCUMENT_DETAIL_POLICY_DOCUMENT_DETAIL_ID",
column: x => x.POLICY_DOCUMENT_DETAIL_ID,
principalTable: "T_OG_POLICY_DOCUMENT_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER_T_OG_POLICY_DOCUMENT_T_OG_POLICY_DOCUMENTID",
column: x => x.T_OG_POLICY_DOCUMENTID,
principalTable: "T_OG_POLICY_DOCUMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_POLICY_DOCUMENT_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),
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),
POLICY_DOCUMENT_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
T_OG_POLICY_DOCUMENTID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_POLICY_DOCUMENT_DETAIL_FILE", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_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_OG_POLICY_DOCUMENT_DETAIL_FILE_T_OG_POLICY_DOCUMENT_DETAIL_POLICY_DOCUMENT_DETAIL_ID",
column: x => x.POLICY_DOCUMENT_DETAIL_ID,
principalTable: "T_OG_POLICY_DOCUMENT_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_DETAIL_FILE_T_OG_POLICY_DOCUMENT_T_OG_POLICY_DOCUMENTID",
column: x => x.T_OG_POLICY_DOCUMENTID,
principalTable: "T_OG_POLICY_DOCUMENT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_POLICY_DOCUMENT_DETAIL_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
column: x => x.IMG_FILE_ID,
principalTable: "T_PF_IMG_FILE",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_ASSESS_ITEM",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ASSESS_PLAN_INPUT_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),
METHOD = 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(100)", maxLength: 100, nullable: true),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ROW_NO = table.Column<int>(type: "int", nullable: false),
SCORE = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_ASSESS_ITEM", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_ITEM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_ITEM_T_OG_SAFE_ASSESS_PLAN_INPUT_ASSESS_PLAN_INPUT_ID",
column: x => x.ASSESS_PLAN_INPUT_ID,
principalTable: "T_OG_SAFE_ASSESS_PLAN_INPUT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CHECK_DETAIL_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),
METHOD = 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),
ROW_NO = table.Column<int>(type: "int", nullable: false),
SCORE = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CHECK_DETAIL_ID",
column: x => x.CHECK_DETAIL_ID,
principalTable: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "T_OG_SAFE_ASSESS_RECORD_ITEM",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ASSESS_ITEM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CORRECT_MEASURES = 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),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RESULT_INSTRUCTIONS = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ROW_NO = table.Column<int>(type: "int", nullable: false),
SCORE = table.Column<decimal>(type: "decimal(18,2)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_OG_SAFE_ASSESS_RECORD_ITEM", x => x.ID);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_RECORD_ITEM_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_RECORD_ITEM_T_OG_SAFE_ASSESS_ITEM_ASSESS_ITEM_ID",
column: x => x.ASSESS_ITEM_ID,
principalTable: "T_OG_SAFE_ASSESS_ITEM",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_OG_SAFE_ASSESS_RECORD_ITEM_T_OG_SAFE_ASSESS_RECORD_DETAIL_RECORD_DETAIL_ID",
column: x => x.RECORD_DETAIL_ID,
principalTable: "T_OG_SAFE_ASSESS_RECORD_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_DEPARTMENT_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_ORG_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_REASON_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL",
column: "REASON_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_REPORT_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL",
column: "REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL_USER_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_DETAIL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_REPORT_DEPARTMENT_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_REPORT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_REPORT_ORG_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_REPORT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_APPROVE_REWARD_PUNISHMENT_REPORT_USER_ID",
table: "T_OG_APPROVE_REWARD_PUNISHMENT_REPORT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM_NAME",
table: "T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM",
column: "NAME",
unique: true,
filter: "[NAME] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM_ORG_ID",
table: "T_OG_EMPLOYEE_ITEM_CATEGORY_ENUM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_ID",
table: "T_OG_EMPLOYEE_OPINION",
column: "COLLECTION_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_ORG_ID",
table: "T_OG_EMPLOYEE_OPINION",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_AH_CHARGE_USER_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION",
column: "AH_CHARGE_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_CHARGE_USER_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION",
column: "CHARGE_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_DEPARTMENT_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_ORG_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_ID1",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_COLLECTION_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER",
column: "COLLECTION_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_ORG_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_USER_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE_COLLECTION_USER_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE",
column: "COLLECTION_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE_IMG_FILE_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE_ORG_ID",
table: "T_OG_EMPLOYEE_OPINION_COLLECTION_USER_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE_EMPLOYEE_OPINION_REPORT_ID",
table: "T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE",
column: "EMPLOYEE_OPINION_REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE_IMG_FILE_ID",
table: "T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE_ORG_ID",
table: "T_OG_EMPLOYEE_OPINION_IMPLEMENT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_REPORT_ASSIGNEE_ID",
table: "T_OG_EMPLOYEE_OPINION_REPORT",
column: "ASSIGNEE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_REPORT_DO_DEPARTMENT_ID",
table: "T_OG_EMPLOYEE_OPINION_REPORT",
column: "DO_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_REPORT_DO_USER_ID",
table: "T_OG_EMPLOYEE_OPINION_REPORT",
column: "DO_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_REPORT_LAUNCH_DEPARTMENT_ID",
table: "T_OG_EMPLOYEE_OPINION_REPORT",
column: "LAUNCH_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_REPORT_ORG_ID",
table: "T_OG_EMPLOYEE_OPINION_REPORT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_REPORT_TYPE_ID",
table: "T_OG_EMPLOYEE_OPINION_REPORT",
column: "TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_REPORT_USER_ID",
table: "T_OG_EMPLOYEE_OPINION_REPORT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE_EMPLOYEE_OPINION_REPORT_ID",
table: "T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE",
column: "EMPLOYEE_OPINION_REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE_IMG_FILE_ID",
table: "T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE_ORG_ID",
table: "T_OG_EMPLOYEE_OPINION_SUGGESTION_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE_EMPLOYEE_REFUSE_ITEM_REPORT_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE",
column: "EMPLOYEE_REFUSE_ITEM_REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE_IMG_FILE_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE_ORG_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_INVESTIGATION_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_ASSIGNEE_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
column: "ASSIGNEE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_IMPLEMENT_DEPARTMENT_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
column: "IMPLEMENT_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_IMPLEMENT_USER_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
column: "IMPLEMENT_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_LAUNCH_DEPARTMENT_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
column: "LAUNCH_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_ORG_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_TYPE_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
column: "TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_USER_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE_EMPLOYEE_REFUSE_ITEM_REPORT_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE",
column: "EMPLOYEE_REFUSE_ITEM_REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE_IMG_FILE_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE_ORG_ID",
table: "T_OG_EMPLOYEE_REFUSE_ITEM_REPORT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DEPARTMENT_ID",
table: "T_OG_EVENT_GET",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_ORG_ID",
table: "T_OG_EVENT_GET",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_USER_ID",
table: "T_OG_EVENT_GET",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_EVENT_ID",
table: "T_OG_EVENT_GET_DETAIL",
column: "EVENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_ORG_ID",
table: "T_OG_EVENT_GET_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_REPLY_USER_ID",
table: "T_OG_EVENT_GET_DETAIL",
column: "REPLY_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_USER_ID",
table: "T_OG_EVENT_GET_DETAIL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_FILE_DETAIL_ID",
table: "T_OG_EVENT_GET_DETAIL_FILE",
column: "DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_FILE_IMG_FILE_ID",
table: "T_OG_EVENT_GET_DETAIL_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_FILE_ORG_ID",
table: "T_OG_EVENT_GET_DETAIL_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_ITEM_DETAIL_ID",
table: "T_OG_EVENT_GET_DETAIL_ITEM",
column: "DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_GET_DETAIL_ITEM_ORG_ID",
table: "T_OG_EVENT_GET_DETAIL_ITEM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_AH_USER_ID",
table: "T_OG_EVENT_REPORT",
column: "AH_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_DEPARTMENT_ID",
table: "T_OG_EVENT_REPORT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_DO_DEPARTMENT_ID",
table: "T_OG_EVENT_REPORT",
column: "DO_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_DO_USER_ID",
table: "T_OG_EVENT_REPORT",
column: "DO_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_ORG_ID",
table: "T_OG_EVENT_REPORT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_USER_ID",
table: "T_OG_EVENT_REPORT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_FILE_IMG_FILE_ID",
table: "T_OG_EVENT_REPORT_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_FILE_ORG_ID",
table: "T_OG_EVENT_REPORT_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_FILE_REPORT_ID",
table: "T_OG_EVENT_REPORT_FILE",
column: "REPORT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EVENT_REPORT_SUM_ORG_ID",
table: "T_OG_EVENT_REPORT_SUM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_ASSIGNEE_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "ASSIGNEE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_DEPARTMENT_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_EXTERNAL_COMPANY_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "EXTERNAL_COMPANY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_ORG_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_DEPARTMENT_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "SURVEY_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_USER_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "SURVEY_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_TYPE_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "TYPE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_USER_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE_EXTERNAL_COMPLAIN_ADVISE_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE",
column: "EXTERNAL_COMPLAIN_ADVISE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE_IMG_FILE_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE_ORG_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE_EXTERNAL_COMPLAIN_ADVISE_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE",
column: "EXTERNAL_COMPLAIN_ADVISE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE_IMG_FILE_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE_ORG_ID",
table: "T_OG_EXTERNAL_COMPLAIN_ADVISE_SURVEY_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_DEPARTMENT_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_DO_DEPARTMENT_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
column: "DO_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_DO_USER_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
column: "DO_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_EXTERNAL_COMPANY_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
column: "EXTERNAL_COMPANY_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_ORG_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_USER_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE_EXTERNAL_CONTACT_COMMUNICATE_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE",
column: "EXTERNAL_CONTACT_COMMUNICATE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE_IMG_FILE_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE_ORG_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE_EXTERNAL_CONTACT_COMMUNICATE_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE",
column: "EXTERNAL_CONTACT_COMMUNICATE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE_IMG_FILE_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE_ORG_ID",
table: "T_OG_EXTERNAL_CONTACT_COMMUNICATE_IMPL_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_DO_DEPARTMENT_ID",
table: "T_OG_INNER_CONTACT",
column: "DO_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_DO_USER_ID",
table: "T_OG_INNER_CONTACT",
column: "DO_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_FORM_DEPARTMENT_ID",
table: "T_OG_INNER_CONTACT",
column: "FORM_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_FROM_USER_ID",
table: "T_OG_INNER_CONTACT",
column: "FROM_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_ORG_ID",
table: "T_OG_INNER_CONTACT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_TO_DEPARTMENT_ID",
table: "T_OG_INNER_CONTACT",
column: "TO_DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_TO_USER_ID",
table: "T_OG_INNER_CONTACT",
column: "TO_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_USER_ID",
table: "T_OG_INNER_CONTACT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_DO_FILE_CONTACT_ID",
table: "T_OG_INNER_CONTACT_DO_FILE",
column: "CONTACT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_DO_FILE_IMG_FILE_ID",
table: "T_OG_INNER_CONTACT_DO_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_DO_FILE_ORG_ID",
table: "T_OG_INNER_CONTACT_DO_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_ITEM_FILE_CONTACT_ID",
table: "T_OG_INNER_CONTACT_ITEM_FILE",
column: "CONTACT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_ITEM_FILE_IMG_FILE_ID",
table: "T_OG_INNER_CONTACT_ITEM_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_INNER_CONTACT_ITEM_FILE_ORG_ID",
table: "T_OG_INNER_CONTACT_ITEM_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_APPOINT_AGREEUSER_ID",
table: "T_OG_POLICY_DOCUMENT",
column: "APPOINT_AGREEUSER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_APPOINT_TYPE",
table: "T_OG_POLICY_DOCUMENT",
column: "APPOINT_TYPE");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DEPARTMENT_ID",
table: "T_OG_POLICY_DOCUMENT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_ORG_ID",
table: "T_OG_POLICY_DOCUMENT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_USER_ID",
table: "T_OG_POLICY_DOCUMENT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_AGREEUSER_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL",
column: "APPOINT_AGREEUSER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_TYPE",
table: "T_OG_POLICY_DOCUMENT_DETAIL",
column: "APPOINT_TYPE");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_DEPARTMENT_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_ORG_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_POLICY_DOCUMENT_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL",
column: "POLICY_DOCUMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_USER_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER_ORG_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER_POLICY_DOCUMENT_DETAIL_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER",
column: "POLICY_DOCUMENT_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER_T_OG_POLICY_DOCUMENTID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER",
column: "T_OG_POLICY_DOCUMENTID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER_USER_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_APPOINT_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_FILE_IMG_FILE_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_FILE_ORG_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_FILE_POLICY_DOCUMENT_DETAIL_ID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_FILE",
column: "POLICY_DOCUMENT_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_DETAIL_FILE_T_OG_POLICY_DOCUMENTID",
table: "T_OG_POLICY_DOCUMENT_DETAIL_FILE",
column: "T_OG_POLICY_DOCUMENTID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_POLICY_DOCUMENT_TYPE_ORG_ID",
table: "T_OG_POLICY_DOCUMENT_TYPE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_ITEM_ASSESS_PLAN_INPUT_ID",
table: "T_OG_SAFE_ASSESS_ITEM",
column: "ASSESS_PLAN_INPUT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_ITEM_ORG_ID",
table: "T_OG_SAFE_ASSESS_ITEM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_PLAN_INPUT_CHECK_ID",
table: "T_OG_SAFE_ASSESS_PLAN_INPUT",
column: "CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_PLAN_INPUT_DEPARTMENT_ID",
table: "T_OG_SAFE_ASSESS_PLAN_INPUT",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_PLAN_INPUT_ORG_ID",
table: "T_OG_SAFE_ASSESS_PLAN_INPUT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_PLAN_INPUT_POST_ID",
table: "T_OG_SAFE_ASSESS_PLAN_INPUT",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_PLAN_INPUT_USER_ID",
table: "T_OG_SAFE_ASSESS_PLAN_INPUT",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_DEPARTMENT_ID",
table: "T_OG_SAFE_ASSESS_RECORD",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_ORG_ID",
table: "T_OG_SAFE_ASSESS_RECORD",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_USER_ID",
table: "T_OG_SAFE_ASSESS_RECORD",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_DETAIL_ORG_ID",
table: "T_OG_SAFE_ASSESS_RECORD_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_DETAIL_POST_ID",
table: "T_OG_SAFE_ASSESS_RECORD_DETAIL",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_DETAIL_SAFE_ASSESS_RECORD_ID",
table: "T_OG_SAFE_ASSESS_RECORD_DETAIL",
column: "SAFE_ASSESS_RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_DETAIL_USER_ID",
table: "T_OG_SAFE_ASSESS_RECORD_DETAIL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_ITEM_ASSESS_ITEM_ID",
table: "T_OG_SAFE_ASSESS_RECORD_ITEM",
column: "ASSESS_ITEM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_ITEM_ORG_ID",
table: "T_OG_SAFE_ASSESS_RECORD_ITEM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_ASSESS_RECORD_ITEM_RECORD_DETAIL_ID",
table: "T_OG_SAFE_ASSESS_RECORD_ITEM",
column: "RECORD_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DEPARTMENT_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_ORG_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_USER_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CHECK_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL",
column: "CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_ORG_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_POST_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT_CHECK_DETAIL_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT",
column: "CHECK_DETAIL_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT_ORG_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_DETAIL_CONTENT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE_CHECK_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE",
column: "CHECK_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE_IMG_FILE_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE",
column: "IMG_FILE_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE_ORG_ID",
table: "T_OG_SAFE_PDT_ASSESS_PLAN_CHECK_FILE",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_CHARGE_USER_ID",
table: "T_OG_SAFE_PDT_SIGNED",
column: "CHARGE_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_DEPARTMENT_ID",
table: "T_OG_SAFE_PDT_SIGNED",
column: "DEPARTMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_Nav_CreateUserID",
table: "T_OG_SAFE_PDT_SIGNED",
column: "Nav_CreateUserID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_ORG_ID",
table: "T_OG_SAFE_PDT_SIGNED",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_STANDARD_ID",
table: "T_OG_SAFE_PDT_SIGNED",
column: "STANDARD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_POST_CHARGE_USER_ID",
table: "T_OG_SAFE_PDT_SIGNED_POST",
column: "CHARGE_USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_POST_ORG_ID",
table: "T_OG_SAFE_PDT_SIGNED_POST",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_POST_POST_ID",
table: "T_OG_SAFE_PDT_SIGNED_POST",
column: "POST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_POST_SAFE_PDT_SIGNED_ID",
table: "T_OG_SAFE_PDT_SIGNED_POST",
column: "SAFE_PDT_SIGNED_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_SAFE_PDT_SIGNED_POST_USER_ID",
table: "T_OG_SAFE_PDT_SIGNED_POST",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_ACTION_PLAN_ENUM_NAME",
table: "T_OG_STANDARDIZATION_ACTION_PLAN_ENUM",
column: "NAME",
unique: true,
filter: "[NAME] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_ACTION_PLAN_ENUM_ORG_ID",
table: "T_OG_STANDARDIZATION_ACTION_PLAN_ENUM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_ACTION_PLAN_REL_ORG_ID",
table: "T_OG_STANDARDIZATION_ACTION_PLAN_REL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_ACTION_PLAN_REL_PLAN_ID",
table: "T_OG_STANDARDIZATION_ACTION_PLAN_REL",
column: "PLAN_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_ACTION_PLAN_REL_REVIEW_ID",
table: "T_OG_STANDARDIZATION_ACTION_PLAN_REL",
column: "REVIEW_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_ACTION_PLAN_REL_USER_ID",
table: "T_OG_STANDARDIZATION_ACTION_PLAN_REL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_PERSON_REL_ORG_ID",
table: "T_OG_STANDARDIZATION_PERSON_REL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_PERSON_REL_REVIEW_ID",
table: "T_OG_STANDARDIZATION_PERSON_REL",
column: "REVIEW_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_PERSON_REL_USER_ID",
table: "T_OG_STANDARDIZATION_PERSON_REL",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM_NAME",
table: "T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM",
column: "NAME",
unique: true,
filter: "[NAME] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM_ORG_ID",
table: "T_OG_STANDARDIZATION_REVIEW_ITEM_ENUM",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_ITEMS_REL_ITEM_ID",
table: "T_OG_STANDARDIZATION_REVIEW_ITEMS_REL",
column: "ITEM_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_ITEMS_REL_ORG_ID",
table: "T_OG_STANDARDIZATION_REVIEW_ITEMS_REL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_ITEMS_REL_REVIEW_ID",
table: "T_OG_STANDARDIZATION_REVIEW_ITEMS_REL",
column: "REVIEW_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_RESULT_REL_ORG_ID",
table: "T_OG_STANDARDIZATION_REVIEW_RESULT_REL",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_RESULT_REL_RESULT_ID",
table: "T_OG_STANDARDIZATION_REVIEW_RESULT_REL",
column: "RESULT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_REVIEW_RESULT_REL_REVIEW_ID",
table: "T_OG_STANDARDIZATION_REVIEW_RESULT_REL",
column: "REVIEW_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_SYSTEM_REVIEW_HOST_ID",
table: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
column: "HOST_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_SYSTEM_REVIEW_ORG_ID",
table: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_OG_STANDARDIZATION_SYSTEM_REVIEW_USER_ID",
table: "T_OG_STANDARDIZATION_SYSTEM_REVIEW",
column: "USER_ID");
}
}
}