Compare commits
3 Commits
70c5c1bf4e
...
4387d62865
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4387d62865 | ||
|
|
8038b1fd11 | ||
|
|
895d252c34 |
1092
DAL/Migrations/20240805093234_InitialCreate.Designer.cs
generated
1092
DAL/Migrations/20240805093234_InitialCreate.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,751 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DAL.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "webapi");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AdWebAppToWebAppRole",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
AdWebAppToWebAppRoleId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WebAppId = table.Column<int>(type: "int", nullable: false),
|
||||
AdWebAppName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AdWebAppRoleName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AdWebAppToWebAppRole", x => x.AdWebAppToWebAppRoleId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CostCentre",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
CostCentreId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CostCentreName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SortOrder = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CostCentre", x => x.CostCentreId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Department",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CostCentreId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentTypeId = table.Column<int>(type: "int", nullable: false),
|
||||
HeadofDepartmentId = table.Column<int>(type: "int", nullable: true),
|
||||
ExecutiveDirectorId = table.Column<int>(type: "int", nullable: true),
|
||||
ManagingDirectorId = table.Column<int>(type: "int", nullable: true),
|
||||
DepartmentNameFolder = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AdGroupDepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: true),
|
||||
IsVirtual = table.Column<bool>(type: "bit", nullable: false),
|
||||
CostCentre = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
HeadofDepartment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ExecutiveDirector = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ManagingDirector = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Department", x => x.DepartmentId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DepartmentToWebAppToEmployeeForWindream",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
DepartmentToWebAppToEmployeeForWindreamId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LoginName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsMain = table.Column<int>(type: "int", nullable: false),
|
||||
ClientId = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DepartmentToWebAppToEmployeeForWindream", x => x.DepartmentToWebAppToEmployeeForWindreamId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DocumentArt",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
DocumentArtId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Shortname = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RootPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Folder = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentNamesList = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DocumentArt", x => x.DocumentArtId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DocumentArtToDepartment",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
DocumentArtToDepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
DocumentArtId = table.Column<int>(type: "int", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
UseGlobix = table.Column<bool>(type: "bit", nullable: true),
|
||||
DocumentArtName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DocumentArtShortname = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DocumentArtFolder = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DocumentArtToDepartment", x => x.DocumentArtToDepartmentId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Employee",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
EmployeeId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Salutation = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Position = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LoginName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RangId = table.Column<int>(type: "int", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: true),
|
||||
MandantCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MainDepartmentId = table.Column<int>(type: "int", nullable: true),
|
||||
DepartmentNamesList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DepartmentIdList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebappNamesList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebappIdList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AttributeNamesList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AttributeIdList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MobilePhoneNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PhoneNo = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Employee", x => x.EmployeeId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeAttribute",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
EmployeeAttributeId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Shortname = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RoleList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SeqNo = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeAttribute", x => x.EmployeeAttributeId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeStatus",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
EmployeeStatusId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeStatusName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeStatus", x => x.EmployeeStatusId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeToAttribute",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
EmployeeToAttributeId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeId = table.Column<int>(type: "int", nullable: false),
|
||||
EmployeeAttributeId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeToAttribute", x => x.EmployeeToAttributeId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeToDepartment",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
EmployeeToDepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EmployeeBudget = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
EmployeeStatusId = table.Column<int>(type: "int", nullable: true),
|
||||
RangId = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeToDepartment", x => x.EmployeeToDepartmentId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeToWebApp",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
EmployeeToWebAppId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeId = table.Column<int>(type: "int", nullable: false),
|
||||
WebAppId = table.Column<int>(type: "int", nullable: false),
|
||||
WebAppRoleId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: true),
|
||||
WebAppRoleName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebAppName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ExtendedDepartmentNameList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ExtendedDepartmentIdList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AdditionalRoleNameList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AdditionalRoleIdList = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeToWebApp", x => x.EmployeeToWebAppId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Project",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
ProjectId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ProjectName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Project", x => x.ProjectId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Rang",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
RangId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
RangName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RangShortname = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RangOrder = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Rang", x => x.RangId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Subsidiary",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
SubsidiaryId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ClientId = table.Column<int>(type: "int", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SubsidiaryCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Subsidiary", x => x.SubsidiaryId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebApp",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WebAppName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebAppLinkLive = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebAppLinkDev = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
AdWebAppName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebApp", x => x.WebAppId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebAppAdditionalRole",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppAdditionalRoleId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WebAppId = table.Column<int>(type: "int", nullable: false),
|
||||
WebAppAdditionalRoleName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AdWebAppAdditionalRoleName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebAppAdditionalRole", x => x.WebAppAdditionalRoleId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebAppEmployeeInfo",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppEmployeeInfoId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Salutation = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
FirstName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LastName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Position = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LoginName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
ExtendedDepartmentIdList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EmployeeId = table.Column<int>(type: "int", nullable: false),
|
||||
CostCentreId = table.Column<int>(type: "int", nullable: false),
|
||||
RangShortname = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RangName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RangOrder = table.Column<int>(type: "int", nullable: false),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
WebAppId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebAppEmployeeInfo", x => x.WebAppEmployeeInfoId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebAppRole",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppRoleId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WebAppRoleName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebAppRoleHierarchy = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebAppRole", x => x.WebAppRoleId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebAppToDepartment",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppToDepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeToWebAppId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebAppToDepartment", x => x.WebAppToDepartmentId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebAppToWebAppAdditionalRole",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppToWebAppAdditionalRoleId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WebAppAdditionalRoleId = table.Column<int>(type: "int", nullable: false),
|
||||
EmployeeToWebAppId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebAppToWebAppAdditionalRole", x => x.WebAppToWebAppAdditionalRoleId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebAppToWebAppRole",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppToWebAppRoleId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WebAppId = table.Column<int>(type: "int", nullable: false),
|
||||
WebAppRoleId = table.Column<int>(type: "int", nullable: false),
|
||||
WebAppRoleName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebAppRoleHierarchy = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebAppToWebAppRole", x => x.WebAppToWebAppRoleId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WebAppUser",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WebAppUserId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ShortName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LoginName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Password = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RoleList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WebAppRoleList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
JwtExpiredOn = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastLogin = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ClientVersion = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Language = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Culture = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WebAppUser", x => x.WebAppUserId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamColumnsToDepartment",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamColumnsToDepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
AttributeDwAttrId = table.Column<int>(type: "int", nullable: false),
|
||||
AttributeSzColumnName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AttributeDwAttrType = table.Column<int>(type: "int", nullable: false),
|
||||
ComumnLength = table.Column<int>(type: "int", nullable: false),
|
||||
ObjectTypeAttributeSzName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
ObjectTypeszDocTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
Seq = table.Column<int>(type: "int", nullable: false),
|
||||
WindreamSearchId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamColumnsToDepartment", x => x.WindreamColumnsToDepartmentId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamIndex",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamIndexId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
AttributeDwAttrId = table.Column<int>(type: "int", nullable: false),
|
||||
AttributeSzColumnName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ComumnLength = table.Column<int>(type: "int", nullable: true),
|
||||
AttributeDwAttrType = table.Column<int>(type: "int", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
ObjectTypeAttributeSzName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamIndex", x => x.WindreamIndexId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamIndexToWindreamSearchToDepartment",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamIndexToWindreamSearchToDepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WindreamSearchToDepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
WindreamIndexId = table.Column<int>(type: "int", nullable: false),
|
||||
Seq = table.Column<int>(type: "int", nullable: false),
|
||||
AttributeSzColumnName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ObjectTypeAttributeSzName = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamIndexToWindreamSearchToDepartment", x => x.WindreamIndexToWindreamSearchToDepartmentId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamInputFolder",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamInputFolderId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
XMLPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamInputFolder", x => x.WindreamInputFolderId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamSearch",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamSearchId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
XMLPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
Color = table.Column<int>(type: "int", nullable: true),
|
||||
SearchIndex = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamSearch", x => x.WindreamSearchId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamSearchItem",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamSearchItemId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClientId = table.Column<int>(type: "int", nullable: false),
|
||||
Caption = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PlaceHolder = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SearchTemplate = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ConnectedList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AlternativeWindreamSearchItemIdList = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamSearchItem", x => x.WindreamSearchItemId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamSearchItemToWindreamSearchToDepartment",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamSearchItemToWindreamSearchToDepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WindreamSearchToDepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
Seq = table.Column<int>(type: "int", nullable: false),
|
||||
WindreamSearchItemId = table.Column<int>(type: "int", nullable: false),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
WindreamSearchItemName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchItemCaption = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchItemPlaceHolder = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchItemSearchTemplate = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchItemTemplate = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchItemConnectedList = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchItemComment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchIndexType = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamSearchItemToWindreamSearchToDepartment", x => x.WindreamSearchItemToWindreamSearchToDepartmentId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "WindreamSearchToDepartment",
|
||||
schema: "webapi",
|
||||
columns: table => new
|
||||
{
|
||||
WindreamSearchToDepartmentId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DepartmentId = table.Column<int>(type: "int", nullable: false),
|
||||
WindreamSearchId = table.Column<int>(type: "int", nullable: false),
|
||||
Seq = table.Column<int>(type: "int", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchXMLPath = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchComment = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WindreamSearchColor = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_WindreamSearchToDepartment", x => x.WindreamSearchToDepartmentId);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AdWebAppToWebAppRole",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CostCentre",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Department",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DepartmentToWebAppToEmployeeForWindream",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DocumentArt",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "DocumentArtToDepartment",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Employee",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeAttribute",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeStatus",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeToAttribute",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeToDepartment",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeToWebApp",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Project",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Rang",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Subsidiary",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebApp",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebAppAdditionalRole",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebAppEmployeeInfo",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebAppRole",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebAppToDepartment",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebAppToWebAppAdditionalRole",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebAppToWebAppRole",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WebAppUser",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamColumnsToDepartment",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamIndex",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamIndexToWindreamSearchToDepartment",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamInputFolder",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamSearch",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamSearchItem",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamSearchItemToWindreamSearchToDepartment",
|
||||
schema: "webapi");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "WindreamSearchToDepartment",
|
||||
schema: "webapi");
|
||||
}
|
||||
}
|
||||
}
|
||||
1328
DAL/Migrations/20240806071714_InitialCreate.Designer.cs
generated
Normal file
1328
DAL/Migrations/20240806071714_InitialCreate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
751
DAL/Migrations/20240806071714_InitialCreate.cs
Normal file
751
DAL/Migrations/20240806071714_InitialCreate.cs
Normal file
@ -0,0 +1,751 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace DAL.Migrations
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.EnsureSchema(
|
||||
name: "dbo");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_AD_WEB_APP_TO_WEB_APP_ROLE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
AD_WEB_APP_TO_WEB_APP_ROLE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WEB_APP_ID = table.Column<int>(type: "int", nullable: false),
|
||||
AD_WEB_APP_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AD_WEB_APP_ROLE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_AD_WEB_APP_TO_WEB_APP_ROLE", x => x.AD_WEB_APP_TO_WEB_APP_ROLE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_COST_CENTRE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
COST_CENTRE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
COST_CENTRE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SORT_ORDER = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_COST_CENTRE", x => x.COST_CENTRE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COST_CENTRE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_TYPE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
HEADOF_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: true),
|
||||
EXECUTIVE_DIRECTOR_ID = table.Column<int>(type: "int", nullable: true),
|
||||
MANAGING_DIRECTOR_ID = table.Column<int>(type: "int", nullable: true),
|
||||
DEPARTMENT_NAME_FOLDER = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AD_GROUP_DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: true),
|
||||
IS_VIRTUAL = table.Column<bool>(type: "bit", nullable: false),
|
||||
COST_CENTRE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
HEADOF_DEPARTMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EXECUTIVE_DIRECTOR = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MANAGING_DIRECTOR = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_DEPARTMENT", x => x.DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SHORT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LOGIN_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IS_MAIN = table.Column<int>(type: "int", nullable: false),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM", x => x.DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_DOCUMENT_ART",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
DOCUMENT_ART_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SHORTNAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ROOT_PATH = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
FOLDER = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_NAMES_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_DOCUMENT_ART", x => x.DOCUMENT_ART_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_DOCUMENT_ART_TO_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
DOCUMENT_ART_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DOCUMENT_ART_ID = table.Column<int>(type: "int", nullable: false),
|
||||
IS_ACTIVE = table.Column<bool>(type: "bit", nullable: false),
|
||||
USE_GLOBIX = table.Column<bool>(type: "bit", nullable: true),
|
||||
DOCUMENT_ART_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DOCUMENT_ART_SHORTNAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DOCUMENT_ART_FOLDER = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_DOCUMENT_ART_TO_DEPARTMENT", x => x.DOCUMENT_ART_TO_DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_EMPLOYEE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
EMPLOYEE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_NO = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SALUTATION = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
FIRST_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LAST_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SHORT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TITLE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
POSITION = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LOGIN_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EMAIL = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RANG_ID = table.Column<int>(type: "int", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
IS_ACTIVE = table.Column<bool>(type: "bit", nullable: true),
|
||||
MANDANT_CODE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MAIN_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: true),
|
||||
DEPARTMENT_NAMES_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DEPARTMENT_ID_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEBAPP_NAMES_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEBAPP_ID_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ATTRIBUTE_NAMES_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ATTRIBUTE_ID_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
MOBILE_PHONE_NO = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PHONE_NO = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_EMPLOYEE", x => x.EMPLOYEE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_EMPLOYEE_ATTRIBUTE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
EMPLOYEE_ATTRIBUTE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SHORTNAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ROLE_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SEQ_NO = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_EMPLOYEE_ATTRIBUTE", x => x.EMPLOYEE_ATTRIBUTE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_EMPLOYEE_STATUS",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
EMPLOYEE_STATUS_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_STATUS_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_EMPLOYEE_STATUS", x => x.EMPLOYEE_STATUS_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_EMPLOYEE_TO_ATTRIBUTE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
EMPLOYEE_TO_ATTRIBUTE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
EMPLOYEE_ATTRIBUTE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_EMPLOYEE_TO_ATTRIBUTE", x => x.EMPLOYEE_TO_ATTRIBUTE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_EMPLOYEE_TO_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
EMPLOYEE_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EMPLOYEE_BUDGET = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
EMPLOYEE_STATUS_ID = table.Column<int>(type: "int", nullable: true),
|
||||
RANG_ID = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_EMPLOYEE_TO_DEPARTMENT", x => x.EMPLOYEE_TO_DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_EMPLOYEE_TO_WEB_APP",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
EMPLOYEE_TO_WEB_APP_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WEB_APP_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WEB_APP_ROLE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: true),
|
||||
WEB_APP_ROLE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEB_APP_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EXTENDED_DEPARTMENT_NAME_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EXTENDED_DEPARTMENT_ID_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ADDITIONAL_ROLE_NAME_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ADDITIONAL_ROLE_ID_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_EMPLOYEE_TO_WEB_APP", x => x.EMPLOYEE_TO_WEB_APP_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_PROJECT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
PROJECT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
PROJECT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_PROJECT", x => x.PROJECT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_RANG",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
RANG_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
RANG_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RANG_SHORTNAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RANG_ORDER = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_RANG", x => x.RANG_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_SUBSIDIARY",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
SUBSIDIARY_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: true),
|
||||
NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SUBSIDIARY_CODE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_SUBSIDIARY", x => x.SUBSIDIARY_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WEB_APP_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEB_APP_LINK_LIVE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEB_APP_LINK_DEV = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IS_ACTIVE = table.Column<bool>(type: "bit", nullable: false),
|
||||
AD_WEB_APP_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP", x => x.WEB_APP_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP_ADDITIONAL_ROLE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_ADDITIONAL_ROLE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WEB_APP_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WEB_APP_ADDITIONAL_ROLE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AD_WEB_APP_ADDITIONAL_ROLE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP_ADDITIONAL_ROLE", x => x.WEB_APP_ADDITIONAL_ROLE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP_EMPLOYEE_INFO",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_EMPLOYEE_INFO_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_NO = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SALUTATION = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
FIRST_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LAST_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SHORT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
TITLE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
POSITION = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LOGIN_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EMAIL = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
EXTENDED_DEPARTMENT_ID_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
EMPLOYEE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
COST_CENTRE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
RANG_SHORTNAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RANG_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
RANG_ORDER = table.Column<int>(type: "int", nullable: false),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WEB_APP_ID = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP_EMPLOYEE_INFO", x => x.WEB_APP_EMPLOYEE_INFO_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP_ROLE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_ROLE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WEB_APP_ROLE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEB_APP_ROLE_HIERARCHY = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP_ROLE", x => x.WEB_APP_ROLE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP_TO_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EMPLOYEE_TO_WEB_APP_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP_TO_DEPARTMENT", x => x.WEB_APP_TO_DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WEB_APP_ADDITIONAL_ROLE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
EMPLOYEE_TO_WEB_APP_ID = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE", x => x.WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP_TO_WEB_APP_ROLE",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_TO_WEB_APP_ROLE_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WEB_APP_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WEB_APP_ROLE_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WEB_APP_ROLE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEB_APP_ROLE_HIERARCHY = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP_TO_WEB_APP_ROLE", x => x.WEB_APP_TO_WEB_APP_ROLE_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WEB_APP_USER",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WEB_APP_USER_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SHORT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LOGIN_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PASSWORD = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ROLE_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WEB_APP_ROLE_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
JWT_EXPIRED_ON = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LAST_LOGIN = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
CLIENT_VERSION = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
LANGUAGE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CULTURE = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WEB_APP_USER", x => x.WEB_APP_USER_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_COLUMNS_TO_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_COLUMNS_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ATTRIBUTE_DW_ATTR_ID = table.Column<int>(type: "int", nullable: false),
|
||||
ATTRIBUTE_SZ_COLUMN_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ATTRIBUTE_DW_ATTR_TYPE = table.Column<int>(type: "int", nullable: false),
|
||||
COMUMN_LENGTH = table.Column<int>(type: "int", nullable: false),
|
||||
OBJECT_TYPE_ATTRIBUTE_SZ_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
OBJECT_TYPESZ_DOC_TYPE_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
SEQ = table.Column<int>(type: "int", nullable: false),
|
||||
WINDREAM_SEARCH_ID = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_COLUMNS_TO_DEPARTMENT", x => x.WINDREAM_COLUMNS_TO_DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_INDEX",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_INDEX_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ATTRIBUTE_DW_ATTR_ID = table.Column<int>(type: "int", nullable: false),
|
||||
ATTRIBUTE_SZ_COLUMN_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMUMN_LENGTH = table.Column<int>(type: "int", nullable: true),
|
||||
ATTRIBUTE_DW_ATTR_TYPE = table.Column<int>(type: "int", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
OBJECT_TYPE_ATTRIBUTE_SZ_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_INDEX", x => x.WINDREAM_INDEX_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WINDREAM_SEARCH_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WINDREAM_INDEX_ID = table.Column<int>(type: "int", nullable: false),
|
||||
SEQ = table.Column<int>(type: "int", nullable: false),
|
||||
ATTRIBUTE_SZ_COLUMN_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
OBJECT_TYPE_ATTRIBUTE_SZ_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT", x => x.WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_INPUT_FOLDER",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_INPUT_FOLDER_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
XMLPATH = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_INPUT_FOLDER", x => x.WINDREAM_INPUT_FOLDER_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_SEARCH_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
XMLPATH = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
COLOR = table.Column<int>(type: "int", nullable: true),
|
||||
SEARCH_INDEX = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_SEARCH", x => x.WINDREAM_SEARCH_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH_ITEM",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_SEARCH_ITEM_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
CAPTION = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
PLACE_HOLDER = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
SEARCH_TEMPLATE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CONNECTED_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ALTERNATIVE_WINDREAM_SEARCH_ITEM_ID_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_SEARCH_ITEM", x => x.WINDREAM_SEARCH_ITEM_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WINDREAM_SEARCH_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
SEQ = table.Column<int>(type: "int", nullable: false),
|
||||
WINDREAM_SEARCH_ITEM_ID = table.Column<int>(type: "int", nullable: false),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WINDREAM_SEARCH_ITEM_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_ITEM_CAPTION = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_ITEM_PLACE_HOLDER = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_ITEM_SEARCH_TEMPLATE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_ITEM_TEMPLATE = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_ITEM_CONNECTED_LIST = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_ITEM_COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_INDEX_TYPE = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT", x => x.WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT_ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH_TO_DEPARTMENT",
|
||||
schema: "dbo",
|
||||
columns: table => new
|
||||
{
|
||||
WINDREAM_SEARCH_TO_DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DEPARTMENT_ID = table.Column<int>(type: "int", nullable: false),
|
||||
WINDREAM_SEARCH_ID = table.Column<int>(type: "int", nullable: false),
|
||||
SEQ = table.Column<int>(type: "int", nullable: false),
|
||||
IS_ACTIVE = table.Column<bool>(type: "bit", nullable: false),
|
||||
DEPARTMENT_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_NAME = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_XMLPATH = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
WINDREAM_SEARCH_COLOR = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TBSTF_WINDREAM_SEARCH_TO_DEPARTMENT", x => x.WINDREAM_SEARCH_TO_DEPARTMENT_ID);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_AD_WEB_APP_TO_WEB_APP_ROLE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_COST_CENTRE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_DOCUMENT_ART",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_DOCUMENT_ART_TO_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_EMPLOYEE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_EMPLOYEE_ATTRIBUTE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_EMPLOYEE_STATUS",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_EMPLOYEE_TO_ATTRIBUTE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_EMPLOYEE_TO_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_EMPLOYEE_TO_WEB_APP",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_PROJECT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_RANG",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_SUBSIDIARY",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP_ADDITIONAL_ROLE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP_EMPLOYEE_INFO",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP_ROLE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP_TO_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP_TO_WEB_APP_ROLE",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WEB_APP_USER",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_COLUMNS_TO_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_INDEX",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_INPUT_FOLDER",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH_ITEM",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TBSTF_WINDREAM_SEARCH_TO_DEPARTMENT",
|
||||
schema: "dbo");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,10 @@ using DAL.Models.Entities;
|
||||
using HRD.WebApi.DAL;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace DAL
|
||||
{
|
||||
@ -48,162 +52,186 @@ namespace DAL
|
||||
{
|
||||
modelBuilder.Entity<Subsidiary>(entity =>
|
||||
{
|
||||
entity.ToTable("Subsidiary", "webapi");
|
||||
entity.ToTable("TBSTF_SUBSIDIARY", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamInputFolder>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamInputFolder", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_INPUT_FOLDER", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamSearchToDepartment>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamSearchToDepartment", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_SEARCH_TO_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamSearchItemToWindreamSearchToDepartment>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamSearchItemToWindreamSearchToDepartment", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_SEARCH_ITEM_TO_WINDREAM_SEARCH_TO_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamSearchItem>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamSearchItem", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_SEARCH_ITEM", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamSearch>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamSearch", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_SEARCH", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamIndexToWindreamSearchToDepartment>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamIndexToWindreamSearchToDepartment", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_INDEX_TO_WINDREAM_SEARCH_TO_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamIndex>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamIndex", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_INDEX", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WindreamColumnsToDepartment>(entity =>
|
||||
{
|
||||
entity.ToTable("WindreamColumnsToDepartment", "webapi");
|
||||
entity.ToTable("TBSTF_WINDREAM_COLUMNS_TO_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WebAppToWebAppRole>(entity =>
|
||||
{
|
||||
entity.ToTable("WebAppToWebAppRole", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP_TO_WEB_APP_ROLE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WebAppToWebAppAdditionalRole>(entity =>
|
||||
{
|
||||
entity.ToTable("WebAppToWebAppAdditionalRole", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP_TO_WEB_APP_ADDITIONAL_ROLE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WebAppToDepartment>(entity =>
|
||||
{
|
||||
entity.ToTable("WebAppToDepartment", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP_TO_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WebAppAdditionalRole>(entity =>
|
||||
{
|
||||
entity.ToTable("WebAppAdditionalRole", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP_ADDITIONAL_ROLE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<EmployeeToWebApp>(entity =>
|
||||
{
|
||||
entity.ToTable("EmployeeToWebApp", "webapi");
|
||||
entity.ToTable("TBSTF_EMPLOYEE_TO_WEB_APP", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<EmployeeToDepartment>(entity =>
|
||||
{
|
||||
entity.ToTable("EmployeeToDepartment", "webapi");
|
||||
entity.ToTable("TBSTF_EMPLOYEE_TO_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<EmployeeToAttribute>(entity =>
|
||||
{
|
||||
entity.ToTable("EmployeeToAttribute", "webapi");
|
||||
entity.ToTable("TBSTF_EMPLOYEE_TO_ATTRIBUTE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<Employee>(entity =>
|
||||
{
|
||||
entity.ToTable("Employee", "webapi");
|
||||
entity.ToTable("TBSTF_EMPLOYEE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<DocumentArtToDepartment>(entity =>
|
||||
{
|
||||
entity.ToTable("DocumentArtToDepartment", "webapi");
|
||||
entity.ToTable("TBSTF_DOCUMENT_ART_TO_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<DepartmentToWebAppToEmployeeForWindream>(entity =>
|
||||
{
|
||||
entity.ToTable("DepartmentToWebAppToEmployeeForWindream", "webapi");
|
||||
entity.ToTable("TBSTF_DEPARTMENT_TO_WEB_APP_TO_EMPLOYEE_FOR_WINDREAM", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WebAppRole>(entity =>
|
||||
{
|
||||
entity.ToTable("WebAppRole", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP_ROLE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WebApp>(entity =>
|
||||
{
|
||||
entity.ToTable("WebApp", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<Rang>(entity =>
|
||||
{
|
||||
entity.ToTable("Rang", "webapi");
|
||||
entity.ToTable("TBSTF_RANG", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<Project>(entity =>
|
||||
{
|
||||
entity.ToTable("Project", "webapi");
|
||||
entity.ToTable("TBSTF_PROJECT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<EmployeeStatus>(entity =>
|
||||
{
|
||||
entity.ToTable("EmployeeStatus", "webapi");
|
||||
entity.ToTable("TBSTF_EMPLOYEE_STATUS", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<EmployeeAttribute>(entity =>
|
||||
{
|
||||
entity.ToTable("EmployeeAttribute", "webapi");
|
||||
entity.ToTable("TBSTF_EMPLOYEE_ATTRIBUTE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<DocumentArt>(entity =>
|
||||
{
|
||||
entity.ToTable("DocumentArt", "webapi");
|
||||
entity.ToTable("TBSTF_DOCUMENT_ART", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<Department>(entity =>
|
||||
{
|
||||
entity.ToTable("Department", "webapi");
|
||||
entity.ToTable("TBSTF_DEPARTMENT", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<CostCentre>(entity =>
|
||||
{
|
||||
entity.ToTable("CostCentre", "webapi");
|
||||
entity.ToTable("TBSTF_COST_CENTRE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<AdWebAppToWebAppRole>(entity =>
|
||||
{
|
||||
entity.ToTable("AdWebAppToWebAppRole", "webapi");
|
||||
entity.ToTable("TBSTF_AD_WEB_APP_TO_WEB_APP_ROLE", "dbo");
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<WebAppUser>(entity =>
|
||||
{
|
||||
entity.ToTable("WebAppUser", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP_USER", "dbo");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<WebAppEmployeeInfo>(entity =>
|
||||
{
|
||||
entity.ToTable("WebAppEmployeeInfo", "webapi");
|
||||
entity.ToTable("TBSTF_WEB_APP_EMPLOYEE_INFO", "dbo");
|
||||
});
|
||||
|
||||
Configure4DDNaming(modelBuilder.Model.GetEntityTypes().ToArray());
|
||||
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
|
||||
public static void Configure4DDNaming(params IMutableEntityType[] entityTypes)
|
||||
{
|
||||
foreach (var entityType in entityTypes)
|
||||
{
|
||||
// Configure column names
|
||||
foreach (var property in entityType.GetProperties())
|
||||
{
|
||||
var columnName = ToSnakeCase(property.Name);
|
||||
property.SetColumnName(columnName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static string ToSnakeCase(string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
var startUnderscores = System.Text.RegularExpressions.Regex.Match(input, @"^_+");
|
||||
return startUnderscores + System.Text.RegularExpressions.Regex.Replace(input, @"([a-z0-9])([A-Z])", "$1_$2").ToUpper();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {}
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "8.0.7",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,7 @@
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"sqlConnection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=dev_db;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False"
|
||||
"sqlConnection": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
|
||||
},
|
||||
"AppConfig": {
|
||||
"LDAP_WebAppGroup_Is_Live": "false",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user