75 lines
3.6 KiB
C#
75 lines
3.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace APT.Data.Migrations.Migrations
|
|
{
|
|
public partial class wyw2025082101 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "T_WB_REGISTER_2_JOB_TYPE_ENUM",
|
|
columns: table => new
|
|
{
|
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
REGISTERT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
JOBTYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
|
|
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
|
|
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
|
|
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_T_WB_REGISTER_2_JOB_TYPE_ENUM", x => x.ID);
|
|
table.ForeignKey(
|
|
name: "FK_T_WB_REGISTER_2_JOB_TYPE_ENUM_T_FM_ORGANIZATION_ORG_ID",
|
|
column: x => x.ORG_ID,
|
|
principalTable: "T_FM_ORGANIZATION",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
table.ForeignKey(
|
|
name: "FK_T_WB_REGISTER_2_JOB_TYPE_ENUM_T_WB_JOB_TYPE_ENUM_JOBTYPE_ID",
|
|
column: x => x.JOBTYPE_ID,
|
|
principalTable: "T_WB_JOB_TYPE_ENUM",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
table.ForeignKey(
|
|
name: "FK_T_WB_REGISTER_2_JOB_TYPE_ENUM_T_WB_REGISTER_2_REGISTERT_ID",
|
|
column: x => x.REGISTERT_ID,
|
|
principalTable: "T_WB_REGISTER_2",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_WB_REGISTER_2_JOB_TYPE_ENUM_JOBTYPE_ID",
|
|
table: "T_WB_REGISTER_2_JOB_TYPE_ENUM",
|
|
column: "JOBTYPE_ID");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_WB_REGISTER_2_JOB_TYPE_ENUM_ORG_ID",
|
|
table: "T_WB_REGISTER_2_JOB_TYPE_ENUM",
|
|
column: "ORG_ID");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_WB_REGISTER_2_JOB_TYPE_ENUM_REGISTERT_ID",
|
|
table: "T_WB_REGISTER_2_JOB_TYPE_ENUM",
|
|
column: "REGISTERT_ID");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "T_WB_REGISTER_2_JOB_TYPE_ENUM");
|
|
}
|
|
}
|
|
}
|