67 lines
3.2 KiB
C#
67 lines
3.2 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace APT.Data.Migrations.Migrations
|
|
{
|
|
public partial class wyw2026042201 : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "T_PF_BITITLE",
|
|
columns: table => new
|
|
{
|
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
TITLE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
|
VERSION = table.Column<int>(type: "int", nullable: false),
|
|
STATUS = table.Column<int>(type: "int", nullable: false),
|
|
USER_ID_CREATER = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
PARENTID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
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_PF_BITITLE", x => x.ID);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BITITLE_T_FM_ORGANIZATION_ORG_ID",
|
|
column: x => x.ORG_ID,
|
|
principalTable: "T_FM_ORGANIZATION",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
table.ForeignKey(
|
|
name: "FK_T_PF_BITITLE_T_FM_USER_USER_ID_CREATER",
|
|
column: x => x.USER_ID_CREATER,
|
|
principalTable: "T_FM_USER",
|
|
principalColumn: "ID",
|
|
onDelete: ReferentialAction.Restrict);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BITITLE_ORG_ID",
|
|
table: "T_PF_BITITLE",
|
|
column: "ORG_ID");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_T_PF_BITITLE_USER_ID_CREATER",
|
|
table: "T_PF_BITITLE",
|
|
column: "USER_ID_CREATER");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "T_PF_BITITLE");
|
|
}
|
|
}
|
|
}
|