mh_sms/APT.Data.Migrations/Migrations/20240325014058_wyw2024032501.cs

65 lines
3.2 KiB
C#
Raw Permalink Normal View History

2024-04-12 16:50:28 +08:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wyw2024032501 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "T_BS_OPERATE_LOG",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LOGTYPE = table.Column<int>(type: "int", nullable: false),
DATA_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DATA_ID_SUB = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
OPERATEPOINT = table.Column<int>(type: "int", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USRTNAME = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
ORDERNO = table.Column<int>(type: "int", nullable: false),
OPERTETIME = table.Column<DateTime>(type: "datetime2", nullable: true),
ISINTTIME = table.Column<bool>(type: "bit", 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_BS_OPERATE_LOG", x => x.ID);
table.ForeignKey(
name: "FK_T_BS_OPERATE_LOG_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_T_BS_OPERATE_LOG_ORG_ID",
table: "T_BS_OPERATE_LOG",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_BS_OPERATE_LOG_USER_ID",
table: "T_BS_OPERATE_LOG",
column: "USER_ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "T_BS_OPERATE_LOG");
}
}
}