using System; using Microsoft.EntityFrameworkCore.Migrations; namespace WmsWebApi.Migrations { public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AbpAuditLogs", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), UserId = table.Column(type: "uniqueidentifier", nullable: true), UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), TenantName = table.Column(type: "nvarchar(max)", nullable: true), ImpersonatorUserId = table.Column(type: "uniqueidentifier", nullable: true), ImpersonatorTenantId = table.Column(type: "uniqueidentifier", nullable: true), ExecutionTime = table.Column(type: "datetime2", nullable: false), ExecutionDuration = table.Column(type: "int", nullable: false), ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ClientName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), Exceptions = table.Column(type: "nvarchar(max)", nullable: true), Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), HttpStatusCode = table.Column(type: "int", nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpClaimTypes", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Required = table.Column(type: "bit", nullable: false), IsStatic = table.Column(type: "bit", nullable: false), Regex = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), RegexDescription = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Description = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), ValueType = table.Column(type: "int", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpFeatureValues", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Value = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpLinkUsers", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), SourceUserId = table.Column(type: "uniqueidentifier", nullable: false), SourceTenantId = table.Column(type: "uniqueidentifier", nullable: true), TargetUserId = table.Column(type: "uniqueidentifier", nullable: false), TargetTenantId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpOrganizationUnits", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ParentId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(95)", maxLength: 95, nullable: false), DisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); table.ForeignKey( name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", column: x => x.ParentId, principalTable: "AbpOrganizationUnits", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( name: "AbpPermissionGrants", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpRoles", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), IsDefault = table.Column(type: "bit", nullable: false), IsStatic = table.Column(type: "bit", nullable: false), IsPublic = table.Column(type: "bit", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpRoles", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpSecurityLogs", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ApplicationName = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), Identity = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), Action = table.Column(type: "nvarchar(96)", maxLength: 96, nullable: true), UserId = table.Column(type: "uniqueidentifier", nullable: true), UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), TenantName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ClientId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), CorrelationId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ClientIpAddress = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpSettings", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Value = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: false), ProviderName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), ProviderKey = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpSettings", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpTenants", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpTenants", x => x.Id); }); migrationBuilder.CreateTable( name: "AbpUsers", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Surname = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), EmailConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), PasswordHash = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), SecurityStamp = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), IsExternal = table.Column(type: "bit", nullable: false, defaultValue: false), PhoneNumber = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), PhoneNumberConfirmed = table.Column(type: "bit", nullable: false, defaultValue: false), TwoFactorEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), LockoutEnabled = table.Column(type: "bit", nullable: false, defaultValue: false), AccessFailedCount = table.Column(type: "int", nullable: false, defaultValue: 0), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUsers", x => x.Id); }); migrationBuilder.CreateTable( name: "IdentityServerApiResources", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Enabled = table.Column(type: "bit", nullable: false), AllowedAccessTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); }); migrationBuilder.CreateTable( name: "IdentityServerApiScopes", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Enabled = table.Column(type: "bit", nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Required = table.Column(type: "bit", nullable: false), Emphasize = table.Column(type: "bit", nullable: false), ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiScopes", x => x.Id); }); migrationBuilder.CreateTable( name: "IdentityServerClients", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), Enabled = table.Column(type: "bit", nullable: false), ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), RequireClientSecret = table.Column(type: "bit", nullable: false), RequireConsent = table.Column(type: "bit", nullable: false), AllowRememberConsent = table.Column(type: "bit", nullable: false), AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), RequirePkce = table.Column(type: "bit", nullable: false), AllowPlainTextPkce = table.Column(type: "bit", nullable: false), RequireRequestObject = table.Column(type: "bit", nullable: false), AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), AllowOfflineAccess = table.Column(type: "bit", nullable: false), IdentityTokenLifetime = table.Column(type: "int", nullable: false), AllowedIdentityTokenSigningAlgorithms = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), AccessTokenLifetime = table.Column(type: "int", nullable: false), AuthorizationCodeLifetime = table.Column(type: "int", nullable: false), ConsentLifetime = table.Column(type: "int", nullable: true), AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false), SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false), RefreshTokenUsage = table.Column(type: "int", nullable: false), UpdateAccessTokenClaimsOnRefresh = table.Column(type: "bit", nullable: false), RefreshTokenExpiration = table.Column(type: "int", nullable: false), AccessTokenType = table.Column(type: "int", nullable: false), EnableLocalLogin = table.Column(type: "bit", nullable: false), IncludeJwtId = table.Column(type: "bit", nullable: false), AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), UserSsoLifetime = table.Column(type: "int", nullable: true), UserCodeType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), DeviceCodeLifetime = table.Column(type: "int", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClients", x => x.Id); }); migrationBuilder.CreateTable( name: "IdentityServerDeviceFlowCodes", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), DeviceCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), UserCode = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), Expiration = table.Column(type: "datetime2", nullable: false), Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); }); migrationBuilder.CreateTable( name: "IdentityServerIdentityResources", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Enabled = table.Column(type: "bit", nullable: false), Required = table.Column(type: "bit", nullable: false), Emphasize = table.Column(type: "bit", nullable: false), ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), DeleterId = table.Column(type: "uniqueidentifier", nullable: true), DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); }); migrationBuilder.CreateTable( name: "IdentityServerPersistedGrants", columns: table => new { Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), SessionId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Description = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), Expiration = table.Column(type: "datetime2", nullable: true), ConsumedTime = table.Column(type: "datetime2", nullable: true), Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), Id = table.Column(type: "uniqueidentifier", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); }); migrationBuilder.CreateTable( name: "AbpAuditLogActions", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), ServiceName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), MethodName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), Parameters = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), ExecutionTime = table.Column(type: "datetime2", nullable: false), ExecutionDuration = table.Column(type: "int", nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); table.ForeignKey( name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", column: x => x.AuditLogId, principalTable: "AbpAuditLogs", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpEntityChanges", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), AuditLogId = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ChangeTime = table.Column(type: "datetime2", nullable: false), ChangeType = table.Column(type: "tinyint", nullable: false), EntityTenantId = table.Column(type: "uniqueidentifier", nullable: true), EntityId = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), EntityTypeFullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); table.ForeignKey( name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", column: x => x.AuditLogId, principalTable: "AbpAuditLogs", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpOrganizationUnitRoles", columns: table => new { RoleId = table.Column(type: "uniqueidentifier", nullable: false), OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); table.ForeignKey( name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", column: x => x.OrganizationUnitId, principalTable: "AbpOrganizationUnits", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", column: x => x.RoleId, principalTable: "AbpRoles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpRoleClaims", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), RoleId = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); table.ForeignKey( name: "FK_AbpRoleClaims_AbpRoles_RoleId", column: x => x.RoleId, principalTable: "AbpRoles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpTenantConnectionStrings", columns: table => new { TenantId = table.Column(type: "uniqueidentifier", nullable: false), Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); table.ForeignKey( name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", column: x => x.TenantId, principalTable: "AbpTenants", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpUserClaims", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), UserId = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ClaimType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), ClaimValue = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUserClaims", x => x.Id); table.ForeignKey( name: "FK_AbpUserClaims_AbpUsers_UserId", column: x => x.UserId, principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpUserLogins", columns: table => new { UserId = table.Column(type: "uniqueidentifier", nullable: false), LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ProviderKey = table.Column(type: "nvarchar(196)", maxLength: 196, nullable: false), ProviderDisplayName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); table.ForeignKey( name: "FK_AbpUserLogins_AbpUsers_UserId", column: x => x.UserId, principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpUserOrganizationUnits", columns: table => new { UserId = table.Column(type: "uniqueidentifier", nullable: false), OrganizationUnitId = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); table.ForeignKey( name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", column: x => x.OrganizationUnitId, principalTable: "AbpOrganizationUnits", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", column: x => x.UserId, principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpUserRoles", columns: table => new { UserId = table.Column(type: "uniqueidentifier", nullable: false), RoleId = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); table.ForeignKey( name: "FK_AbpUserRoles_AbpRoles_RoleId", column: x => x.RoleId, principalTable: "AbpRoles", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_AbpUserRoles_AbpUsers_UserId", column: x => x.UserId, principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpUserTokens", columns: table => new { UserId = table.Column(type: "uniqueidentifier", nullable: false), LoginProvider = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Value = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); table.ForeignKey( name: "FK_AbpUserTokens_AbpUsers_UserId", column: x => x.UserId, principalTable: "AbpUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerApiResourceClaims", columns: table => new { Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type }); table.ForeignKey( name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerApiResourceProperties", columns: table => new { ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerApiResourceScopes", columns: table => new { ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); table.ForeignKey( name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerApiResourceSecrets", columns: table => new { Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false), Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), Expiration = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); table.ForeignKey( name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId", column: x => x.ApiResourceId, principalTable: "IdentityServerApiResources", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerApiScopeClaims", columns: table => new { Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type }); table.ForeignKey( name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", column: x => x.ApiScopeId, principalTable: "IdentityServerApiScopes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerApiScopeProperties", columns: table => new { ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false), Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId", column: x => x.ApiScopeId, principalTable: "IdentityServerApiScopes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientClaims", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value }); table.ForeignKey( name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientCorsOrigins", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); table.ForeignKey( name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientGrantTypes", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); table.ForeignKey( name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientIdPRestrictions", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); table.ForeignKey( name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientPostLogoutRedirectUris", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); table.ForeignKey( name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientProperties", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientRedirectUris", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); table.ForeignKey( name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientScopes", columns: table => new { ClientId = table.Column(type: "uniqueidentifier", nullable: false), Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope }); table.ForeignKey( name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerClientSecrets", columns: table => new { Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), Value = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: false), ClientId = table.Column(type: "uniqueidentifier", nullable: false), Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), Expiration = table.Column(type: "datetime2", nullable: true) }, constraints: table => { table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value }); table.ForeignKey( name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId", column: x => x.ClientId, principalTable: "IdentityServerClients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerIdentityResourceClaims", columns: table => new { Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); table.ForeignKey( name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId", column: x => x.IdentityResourceId, principalTable: "IdentityServerIdentityResources", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "IdentityServerIdentityResourceProperties", columns: table => new { IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false), Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); table.ForeignKey( name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId", column: x => x.IdentityResourceId, principalTable: "IdentityServerIdentityResources", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "AbpEntityPropertyChanges", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), EntityChangeId = table.Column(type: "uniqueidentifier", nullable: false), NewValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), OriginalValue = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), PropertyName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), PropertyTypeFullName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false) }, constraints: table => { table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); table.ForeignKey( name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", column: x => x.EntityChangeId, principalTable: "AbpEntityChanges", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_AbpAuditLogActions_AuditLogId", table: "AbpAuditLogActions", column: "AuditLogId"); migrationBuilder.CreateIndex( name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", table: "AbpAuditLogActions", columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); migrationBuilder.CreateIndex( name: "IX_AbpAuditLogs_TenantId_ExecutionTime", table: "AbpAuditLogs", columns: new[] { "TenantId", "ExecutionTime" }); migrationBuilder.CreateIndex( name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", table: "AbpAuditLogs", columns: new[] { "TenantId", "UserId", "ExecutionTime" }); migrationBuilder.CreateIndex( name: "IX_AbpEntityChanges_AuditLogId", table: "AbpEntityChanges", column: "AuditLogId"); migrationBuilder.CreateIndex( name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", table: "AbpEntityChanges", columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); migrationBuilder.CreateIndex( name: "IX_AbpEntityPropertyChanges_EntityChangeId", table: "AbpEntityPropertyChanges", column: "EntityChangeId"); migrationBuilder.CreateIndex( name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", table: "AbpFeatureValues", columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", table: "AbpLinkUsers", columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, unique: true, filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", table: "AbpOrganizationUnitRoles", columns: new[] { "RoleId", "OrganizationUnitId" }); migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnits_Code", table: "AbpOrganizationUnits", column: "Code"); migrationBuilder.CreateIndex( name: "IX_AbpOrganizationUnits_ParentId", table: "AbpOrganizationUnits", column: "ParentId"); migrationBuilder.CreateIndex( name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", table: "AbpPermissionGrants", columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpRoleClaims_RoleId", table: "AbpRoleClaims", column: "RoleId"); migrationBuilder.CreateIndex( name: "IX_AbpRoles_NormalizedName", table: "AbpRoles", column: "NormalizedName"); migrationBuilder.CreateIndex( name: "IX_AbpSecurityLogs_TenantId_Action", table: "AbpSecurityLogs", columns: new[] { "TenantId", "Action" }); migrationBuilder.CreateIndex( name: "IX_AbpSecurityLogs_TenantId_ApplicationName", table: "AbpSecurityLogs", columns: new[] { "TenantId", "ApplicationName" }); migrationBuilder.CreateIndex( name: "IX_AbpSecurityLogs_TenantId_Identity", table: "AbpSecurityLogs", columns: new[] { "TenantId", "Identity" }); migrationBuilder.CreateIndex( name: "IX_AbpSecurityLogs_TenantId_UserId", table: "AbpSecurityLogs", columns: new[] { "TenantId", "UserId" }); migrationBuilder.CreateIndex( name: "IX_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpTenants_Name", table: "AbpTenants", column: "Name"); migrationBuilder.CreateIndex( name: "IX_AbpUserClaims_UserId", table: "AbpUserClaims", column: "UserId"); migrationBuilder.CreateIndex( name: "IX_AbpUserLogins_LoginProvider_ProviderKey", table: "AbpUserLogins", columns: new[] { "LoginProvider", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", table: "AbpUserOrganizationUnits", columns: new[] { "UserId", "OrganizationUnitId" }); migrationBuilder.CreateIndex( name: "IX_AbpUserRoles_RoleId_UserId", table: "AbpUserRoles", columns: new[] { "RoleId", "UserId" }); migrationBuilder.CreateIndex( name: "IX_AbpUsers_Email", table: "AbpUsers", column: "Email"); migrationBuilder.CreateIndex( name: "IX_AbpUsers_NormalizedEmail", table: "AbpUsers", column: "NormalizedEmail"); migrationBuilder.CreateIndex( name: "IX_AbpUsers_NormalizedUserName", table: "AbpUsers", column: "NormalizedUserName"); migrationBuilder.CreateIndex( name: "IX_AbpUsers_UserName", table: "AbpUsers", column: "UserName"); migrationBuilder.CreateIndex( name: "IX_IdentityServerClients_ClientId", table: "IdentityServerClients", column: "ClientId"); migrationBuilder.CreateIndex( name: "IX_IdentityServerDeviceFlowCodes_DeviceCode", table: "IdentityServerDeviceFlowCodes", column: "DeviceCode", unique: true); migrationBuilder.CreateIndex( name: "IX_IdentityServerDeviceFlowCodes_Expiration", table: "IdentityServerDeviceFlowCodes", column: "Expiration"); migrationBuilder.CreateIndex( name: "IX_IdentityServerDeviceFlowCodes_UserCode", table: "IdentityServerDeviceFlowCodes", column: "UserCode"); migrationBuilder.CreateIndex( name: "IX_IdentityServerPersistedGrants_Expiration", table: "IdentityServerPersistedGrants", column: "Expiration"); migrationBuilder.CreateIndex( name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", table: "IdentityServerPersistedGrants", columns: new[] { "SubjectId", "ClientId", "Type" }); migrationBuilder.CreateIndex( name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", table: "IdentityServerPersistedGrants", columns: new[] { "SubjectId", "SessionId", "Type" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AbpAuditLogActions"); migrationBuilder.DropTable( name: "AbpClaimTypes"); migrationBuilder.DropTable( name: "AbpEntityPropertyChanges"); migrationBuilder.DropTable( name: "AbpFeatureValues"); migrationBuilder.DropTable( name: "AbpLinkUsers"); migrationBuilder.DropTable( name: "AbpOrganizationUnitRoles"); migrationBuilder.DropTable( name: "AbpPermissionGrants"); migrationBuilder.DropTable( name: "AbpRoleClaims"); migrationBuilder.DropTable( name: "AbpSecurityLogs"); migrationBuilder.DropTable( name: "AbpSettings"); migrationBuilder.DropTable( name: "AbpTenantConnectionStrings"); migrationBuilder.DropTable( name: "AbpUserClaims"); migrationBuilder.DropTable( name: "AbpUserLogins"); migrationBuilder.DropTable( name: "AbpUserOrganizationUnits"); migrationBuilder.DropTable( name: "AbpUserRoles"); migrationBuilder.DropTable( name: "AbpUserTokens"); migrationBuilder.DropTable( name: "IdentityServerApiResourceClaims"); migrationBuilder.DropTable( name: "IdentityServerApiResourceProperties"); migrationBuilder.DropTable( name: "IdentityServerApiResourceScopes"); migrationBuilder.DropTable( name: "IdentityServerApiResourceSecrets"); migrationBuilder.DropTable( name: "IdentityServerApiScopeClaims"); migrationBuilder.DropTable( name: "IdentityServerApiScopeProperties"); migrationBuilder.DropTable( name: "IdentityServerClientClaims"); migrationBuilder.DropTable( name: "IdentityServerClientCorsOrigins"); migrationBuilder.DropTable( name: "IdentityServerClientGrantTypes"); migrationBuilder.DropTable( name: "IdentityServerClientIdPRestrictions"); migrationBuilder.DropTable( name: "IdentityServerClientPostLogoutRedirectUris"); migrationBuilder.DropTable( name: "IdentityServerClientProperties"); migrationBuilder.DropTable( name: "IdentityServerClientRedirectUris"); migrationBuilder.DropTable( name: "IdentityServerClientScopes"); migrationBuilder.DropTable( name: "IdentityServerClientSecrets"); migrationBuilder.DropTable( name: "IdentityServerDeviceFlowCodes"); migrationBuilder.DropTable( name: "IdentityServerIdentityResourceClaims"); migrationBuilder.DropTable( name: "IdentityServerIdentityResourceProperties"); migrationBuilder.DropTable( name: "IdentityServerPersistedGrants"); migrationBuilder.DropTable( name: "AbpEntityChanges"); migrationBuilder.DropTable( name: "AbpTenants"); migrationBuilder.DropTable( name: "AbpOrganizationUnits"); migrationBuilder.DropTable( name: "AbpRoles"); migrationBuilder.DropTable( name: "AbpUsers"); migrationBuilder.DropTable( name: "IdentityServerApiResources"); migrationBuilder.DropTable( name: "IdentityServerApiScopes"); migrationBuilder.DropTable( name: "IdentityServerClients"); migrationBuilder.DropTable( name: "IdentityServerIdentityResources"); migrationBuilder.DropTable( name: "AbpAuditLogs"); } } }