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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WebAppId = table.Column(type: "int", nullable: false), AdWebAppName = table.Column(type: "nvarchar(max)", nullable: true), AdWebAppRoleName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), CostCentreName = table.Column(type: "nvarchar(max)", nullable: true), SortOrder = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), CostCentreId = table.Column(type: "int", nullable: false), DepartmentTypeId = table.Column(type: "int", nullable: false), HeadofDepartmentId = table.Column(type: "int", nullable: true), ExecutiveDirectorId = table.Column(type: "int", nullable: true), ManagingDirectorId = table.Column(type: "int", nullable: true), DepartmentNameFolder = table.Column(type: "nvarchar(max)", nullable: true), AdGroupDepartmentName = table.Column(type: "nvarchar(max)", nullable: true), ClientId = table.Column(type: "int", nullable: true), IsVirtual = table.Column(type: "bit", nullable: false), CostCentre = table.Column(type: "nvarchar(max)", nullable: true), HeadofDepartment = table.Column(type: "nvarchar(max)", nullable: true), ExecutiveDirector = table.Column(type: "nvarchar(max)", nullable: true), ManagingDirector = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeId = table.Column(type: "int", nullable: false), DepartmentId = table.Column(type: "int", nullable: false), DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), ShortName = table.Column(type: "nvarchar(max)", nullable: true), LoginName = table.Column(type: "nvarchar(max)", nullable: true), IsMain = table.Column(type: "int", nullable: false), ClientId = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: true), Shortname = table.Column(type: "nvarchar(max)", nullable: true), RootPath = table.Column(type: "nvarchar(max)", nullable: true), Folder = table.Column(type: "nvarchar(max)", nullable: true), Comment = table.Column(type: "nvarchar(max)", nullable: true), ClientId = table.Column(type: "int", nullable: false), DepartmentNamesList = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DepartmentId = table.Column(type: "int", nullable: false), DocumentArtId = table.Column(type: "int", nullable: false), IsActive = table.Column(type: "bit", nullable: false), UseGlobix = table.Column(type: "bit", nullable: true), DocumentArtName = table.Column(type: "nvarchar(max)", nullable: true), DocumentArtShortname = table.Column(type: "nvarchar(max)", nullable: true), DocumentArtFolder = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeNo = table.Column(type: "nvarchar(max)", nullable: true), Salutation = table.Column(type: "nvarchar(max)", nullable: true), FirstName = table.Column(type: "nvarchar(max)", nullable: true), LastName = table.Column(type: "nvarchar(max)", nullable: true), ShortName = table.Column(type: "nvarchar(max)", nullable: true), Title = table.Column(type: "nvarchar(max)", nullable: true), Position = table.Column(type: "nvarchar(max)", nullable: true), LoginName = table.Column(type: "nvarchar(max)", nullable: true), Email = table.Column(type: "nvarchar(max)", nullable: true), RangId = table.Column(type: "int", nullable: true), ClientId = table.Column(type: "int", nullable: false), IsActive = table.Column(type: "bit", nullable: true), MandantCode = table.Column(type: "nvarchar(max)", nullable: true), MainDepartmentId = table.Column(type: "int", nullable: true), DepartmentNamesList = table.Column(type: "nvarchar(max)", nullable: true), DepartmentIdList = table.Column(type: "nvarchar(max)", nullable: true), WebappNamesList = table.Column(type: "nvarchar(max)", nullable: true), WebappIdList = table.Column(type: "nvarchar(max)", nullable: true), AttributeNamesList = table.Column(type: "nvarchar(max)", nullable: true), AttributeIdList = table.Column(type: "nvarchar(max)", nullable: true), MobilePhoneNo = table.Column(type: "nvarchar(max)", nullable: true), PhoneNo = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: true), Shortname = table.Column(type: "nvarchar(max)", nullable: true), RoleList = table.Column(type: "nvarchar(max)", nullable: true), SeqNo = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeStatusName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeId = table.Column(type: "int", nullable: false), EmployeeAttributeId = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeId = table.Column(type: "int", nullable: false), DepartmentId = table.Column(type: "int", nullable: false), DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), EmployeeBudget = table.Column(type: "decimal(18,2)", nullable: false), EmployeeStatusId = table.Column(type: "int", nullable: true), RangId = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeId = table.Column(type: "int", nullable: false), WebAppId = table.Column(type: "int", nullable: false), WebAppRoleId = table.Column(type: "int", nullable: false), DepartmentId = table.Column(type: "int", nullable: true), WebAppRoleName = table.Column(type: "nvarchar(max)", nullable: true), WebAppName = table.Column(type: "nvarchar(max)", nullable: true), DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), ExtendedDepartmentNameList = table.Column(type: "nvarchar(max)", nullable: true), ExtendedDepartmentIdList = table.Column(type: "nvarchar(max)", nullable: true), AdditionalRoleNameList = table.Column(type: "nvarchar(max)", nullable: true), AdditionalRoleIdList = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), ProjectName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), RangName = table.Column(type: "nvarchar(max)", nullable: true), RangShortname = table.Column(type: "nvarchar(max)", nullable: true), RangOrder = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), ClientId = table.Column(type: "int", nullable: true), Name = table.Column(type: "nvarchar(max)", nullable: true), SubsidiaryCode = table.Column(type: "nvarchar(max)", nullable: true), Comment = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WebAppName = table.Column(type: "nvarchar(max)", nullable: true), WebAppLinkLive = table.Column(type: "nvarchar(max)", nullable: true), WebAppLinkDev = table.Column(type: "nvarchar(max)", nullable: true), IsActive = table.Column(type: "bit", nullable: false), AdWebAppName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WebAppId = table.Column(type: "int", nullable: false), WebAppAdditionalRoleName = table.Column(type: "nvarchar(max)", nullable: true), AdWebAppAdditionalRoleName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeNo = table.Column(type: "nvarchar(max)", nullable: true), Salutation = table.Column(type: "nvarchar(max)", nullable: true), FirstName = table.Column(type: "nvarchar(max)", nullable: true), LastName = table.Column(type: "nvarchar(max)", nullable: true), ShortName = table.Column(type: "nvarchar(max)", nullable: true), Title = table.Column(type: "nvarchar(max)", nullable: true), Position = table.Column(type: "nvarchar(max)", nullable: true), LoginName = table.Column(type: "nvarchar(max)", nullable: true), Email = table.Column(type: "nvarchar(max)", nullable: true), DepartmentId = table.Column(type: "int", nullable: false), ExtendedDepartmentIdList = table.Column(type: "nvarchar(max)", nullable: true), DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), EmployeeId = table.Column(type: "int", nullable: false), CostCentreId = table.Column(type: "int", nullable: false), RangShortname = table.Column(type: "nvarchar(max)", nullable: true), RangName = table.Column(type: "nvarchar(max)", nullable: true), RangOrder = table.Column(type: "int", nullable: false), ClientId = table.Column(type: "int", nullable: false), WebAppId = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WebAppRoleName = table.Column(type: "nvarchar(max)", nullable: true), WebAppRoleHierarchy = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EmployeeToWebAppId = table.Column(type: "int", nullable: false), DepartmentId = table.Column(type: "int", nullable: false), DepartmentName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WebAppAdditionalRoleId = table.Column(type: "int", nullable: false), EmployeeToWebAppId = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WebAppId = table.Column(type: "int", nullable: false), WebAppRoleId = table.Column(type: "int", nullable: false), WebAppRoleName = table.Column(type: "nvarchar(max)", nullable: true), WebAppRoleHierarchy = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: true), ShortName = table.Column(type: "nvarchar(max)", nullable: true), LoginName = table.Column(type: "nvarchar(max)", nullable: true), Password = table.Column(type: "nvarchar(max)", nullable: true), RoleList = table.Column(type: "nvarchar(max)", nullable: true), WebAppRoleList = table.Column(type: "nvarchar(max)", nullable: true), JwtExpiredOn = table.Column(type: "datetime2", nullable: true), LastLogin = table.Column(type: "datetime2", nullable: true), ClientVersion = table.Column(type: "nvarchar(max)", nullable: true), Language = table.Column(type: "nvarchar(max)", nullable: true), Culture = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), AttributeDwAttrId = table.Column(type: "int", nullable: false), AttributeSzColumnName = table.Column(type: "nvarchar(max)", nullable: true), Comment = table.Column(type: "nvarchar(max)", nullable: true), AttributeDwAttrType = table.Column(type: "int", nullable: false), ComumnLength = table.Column(type: "int", nullable: false), ObjectTypeAttributeSzName = table.Column(type: "nvarchar(max)", nullable: true), ClientId = table.Column(type: "int", nullable: false), ObjectTypeszDocTypeName = table.Column(type: "nvarchar(max)", nullable: true), DepartmentId = table.Column(type: "int", nullable: false), Seq = table.Column(type: "int", nullable: false), WindreamSearchId = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), AttributeDwAttrId = table.Column(type: "int", nullable: false), AttributeSzColumnName = table.Column(type: "nvarchar(max)", nullable: true), Comment = table.Column(type: "nvarchar(max)", nullable: true), ComumnLength = table.Column(type: "int", nullable: true), AttributeDwAttrType = table.Column(type: "int", nullable: true), ClientId = table.Column(type: "int", nullable: false), ObjectTypeAttributeSzName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WindreamSearchToDepartmentId = table.Column(type: "int", nullable: false), WindreamIndexId = table.Column(type: "int", nullable: false), Seq = table.Column(type: "int", nullable: false), AttributeSzColumnName = table.Column(type: "nvarchar(max)", nullable: true), ObjectTypeAttributeSzName = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: true), XMLPath = table.Column(type: "nvarchar(max)", nullable: true), Comment = table.Column(type: "nvarchar(max)", nullable: true), ClientId = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: true), XMLPath = table.Column(type: "nvarchar(max)", nullable: true), Comment = table.Column(type: "nvarchar(max)", nullable: true), ClientId = table.Column(type: "int", nullable: false), Color = table.Column(type: "int", nullable: true), SearchIndex = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Name = table.Column(type: "nvarchar(max)", nullable: true), Comment = table.Column(type: "nvarchar(max)", nullable: true), ClientId = table.Column(type: "int", nullable: false), Caption = table.Column(type: "nvarchar(max)", nullable: true), PlaceHolder = table.Column(type: "nvarchar(max)", nullable: true), SearchTemplate = table.Column(type: "nvarchar(max)", nullable: true), ConnectedList = table.Column(type: "nvarchar(max)", nullable: true), AlternativeWindreamSearchItemIdList = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), WindreamSearchToDepartmentId = table.Column(type: "int", nullable: false), Seq = table.Column(type: "int", nullable: false), WindreamSearchItemId = table.Column(type: "int", nullable: false), DepartmentId = table.Column(type: "int", nullable: false), WindreamSearchItemName = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchItemCaption = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchItemPlaceHolder = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchItemSearchTemplate = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchItemTemplate = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchItemConnectedList = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchItemComment = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchIndexType = table.Column(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(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DepartmentId = table.Column(type: "int", nullable: false), WindreamSearchId = table.Column(type: "int", nullable: false), Seq = table.Column(type: "int", nullable: false), IsActive = table.Column(type: "bit", nullable: false), DepartmentName = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchName = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchXMLPath = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchComment = table.Column(type: "nvarchar(max)", nullable: true), WindreamSearchColor = table.Column(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"); } } }