650 lines
37 KiB
C#
650 lines
37 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace MiaoYu.Repository.Admin.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class sqlserver_init : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "flow",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Number = table.Column<int>(type: "int", nullable: true),
|
|
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_flow", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "flow_approval",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
UserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
LaunchTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
FormId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
FlowId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
FlowCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
FlowName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_flow_approval", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "flow_approval_step_history",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Sort = table.Column<int>(type: "int", nullable: false),
|
|
FlowNodeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
FlowNodeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
SortMore = table.Column<int>(type: "int", nullable: false),
|
|
State = table.Column<int>(type: "int", nullable: false),
|
|
Opinions = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
UserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ApprovalDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_flow_approval_step_history", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "flow_approval_step_history_user",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
FlowApprovalStepHistoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
FlowNodeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
FlowNodeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
UserName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_flow_approval_step_history_user", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "flow_node",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
FlowId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Sort = table.Column<int>(type: "int", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_flow_node", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "low_code_list",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Low_Code_TableId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Low_Code_Table_InfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ForeignKeyTableId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
ForeignKeyTableFieldName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_low_code_list", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "low_code_search",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Low_Code_TableId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Low_Code_Table_InfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_low_code_search", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "low_code_table",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Schema = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Type = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
TableName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
DisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
EntityName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ModelPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ServicePath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ControllerPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ClientIndexPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ClientInfoPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ClientServicePath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
IsCover = table.Column<bool>(type: "bit", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_low_code_table", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "low_code_table_info",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Low_Code_TableId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
IsPrimary = table.Column<bool>(type: "bit", nullable: false),
|
|
IsIdentity = table.Column<bool>(type: "bit", nullable: false),
|
|
IsNullable = table.Column<bool>(type: "bit", nullable: false),
|
|
Position = table.Column<int>(type: "int", nullable: false),
|
|
ColumnName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Describe = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
DatabaseColumnType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CsType = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CsField = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
MaxLength = table.Column<int>(type: "int", nullable: true),
|
|
DisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_low_code_table_info", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "member",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Number = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Sex = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Birthday = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
Photo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Introduce = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
FilePath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_member", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "quartz_job_task",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
GroupName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Cron = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ExecuteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
State = table.Column<bool>(type: "bit", nullable: false),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Type = table.Column<int>(type: "int", nullable: false),
|
|
JobPoint = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
RequsetMode = table.Column<int>(type: "int", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_quartz_job_task", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "quartz_job_task_log",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
JobTaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Text = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_quartz_job_task_log", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_data_authority",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
PermissionType = table.Column<int>(type: "int", nullable: false),
|
|
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_data_authority", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_data_authority_custom",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
SysDataAuthorityId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
SysOrganizationId = table.Column<int>(type: "int", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_data_authority_custom", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_dictionary",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
Sort = table.Column<int>(type: "int", nullable: false),
|
|
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Value = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ParentId = table.Column<int>(type: "int", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_dictionary", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_function",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Number = table.Column<int>(type: "int", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_function", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_menu",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
LevelCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Number = table.Column<int>(type: "int", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ComponentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Url = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Router = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
JumpUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Icon = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ParentId = table.Column<int>(type: "int", nullable: true),
|
|
Show = table.Column<bool>(type: "bit", nullable: false),
|
|
Close = table.Column<bool>(type: "bit", nullable: false),
|
|
KeepAlive = table.Column<bool>(type: "bit", nullable: false),
|
|
State = table.Column<bool>(type: "bit", nullable: false),
|
|
Type = table.Column<int>(type: "int", nullable: false),
|
|
Mode = table.Column<int>(type: "int", nullable: false),
|
|
ModuleUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ModuleUrlPro = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_menu", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_menu_function",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Number = table.Column<int>(type: "int", nullable: true),
|
|
MenuId = table.Column<int>(type: "int", nullable: false),
|
|
FunctionCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
FunctionName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_menu_function", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_operation_log",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Api = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Ip = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Form = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
FormBody = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
QueryString = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
TakeUpTime = table.Column<long>(type: "bigint", nullable: false),
|
|
Browser = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
OS = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
ControllerDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
ActionDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_operation_log", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_organization",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
OrderNumber = table.Column<int>(type: "int", nullable: true),
|
|
LevelCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Leader = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
State = table.Column<int>(type: "int", nullable: true),
|
|
ParentId = table.Column<int>(type: "int", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_organization", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_post",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Number = table.Column<int>(type: "int", nullable: true),
|
|
Code = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
State = table.Column<int>(type: "int", nullable: false),
|
|
Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_post", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_role",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Number = table.Column<int>(type: "int", nullable: true),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
IsAdmin = table.Column<bool>(type: "bit", nullable: false),
|
|
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
DeleteLock = table.Column<bool>(type: "bit", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_role", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_role_menu_function",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
MenuId = table.Column<int>(type: "int", nullable: false),
|
|
MenuFunctionId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_role_menu_function", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_user",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
LoginName = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Phone = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
|
DeleteLock = table.Column<bool>(type: "bit", nullable: false),
|
|
OrganizationId = table.Column<int>(type: "int", nullable: true),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_user", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_user_post",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
PostId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_user_post", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "sys_user_role",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
CreatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
LastModifierUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_sys_user_role", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "flow");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "flow_approval");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "flow_approval_step_history");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "flow_approval_step_history_user");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "flow_node");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "low_code_list");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "low_code_search");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "low_code_table");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "low_code_table_info");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "member");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "quartz_job_task");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "quartz_job_task_log");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_data_authority");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_data_authority_custom");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_dictionary");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_function");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_menu");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_menu_function");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_operation_log");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_organization");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_post");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_role");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_role_menu_function");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_user");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_user_post");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "sys_user_role");
|
|
}
|
|
}
|
|
}
|