|
|
@ -1,11 +1,11 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Microsoft.EntityFrameworkCore.Metadata; |
|
|
|
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
using Microsoft.EntityFrameworkCore.Metadata; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
{ |
|
|
|
public partial class Initconfiguration : Migration |
|
|
|
public partial class Initial : Migration |
|
|
|
{ |
|
|
|
protected override void Up(MigrationBuilder migrationBuilder) |
|
|
|
{ |
|
|
@ -13,12 +13,12 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiResources", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Enabled = table.Column<bool>(nullable: false), |
|
|
|
Name = table.Column<string>(maxLength: 200, nullable: false) |
|
|
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true), |
|
|
|
DisplayName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), |
|
|
|
Enabled = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -29,37 +29,42 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "Clients", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
AbsoluteRefreshTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
AccessTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
AccessTokenType = table.Column<int>(nullable: false), |
|
|
|
AllowAccessTokensViaBrowser = table.Column<bool>(nullable: false), |
|
|
|
AllowOfflineAccess = table.Column<bool>(nullable: false), |
|
|
|
AllowPlainTextPkce = table.Column<bool>(nullable: false), |
|
|
|
AllowRememberConsent = table.Column<bool>(nullable: false), |
|
|
|
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(nullable: false), |
|
|
|
AlwaysSendClientClaims = table.Column<bool>(nullable: false), |
|
|
|
AuthorizationCodeLifetime = table.Column<int>(nullable: false), |
|
|
|
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
ClientName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
ClientUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
|
|
EnableLocalLogin = table.Column<bool>(nullable: false), |
|
|
|
Enabled = table.Column<bool>(nullable: false), |
|
|
|
IdentityTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
IncludeJwtId = table.Column<bool>(nullable: false), |
|
|
|
LogoUri = table.Column<string>(nullable: true), |
|
|
|
LogoutSessionRequired = table.Column<bool>(nullable: false), |
|
|
|
LogoutUri = table.Column<string>(nullable: true), |
|
|
|
PrefixClientClaims = table.Column<bool>(nullable: false), |
|
|
|
ProtocolType = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
RefreshTokenExpiration = table.Column<int>(nullable: false), |
|
|
|
RefreshTokenUsage = table.Column<int>(nullable: false), |
|
|
|
RequireClientSecret = table.Column<bool>(nullable: false), |
|
|
|
RequireConsent = table.Column<bool>(nullable: false), |
|
|
|
RequirePkce = table.Column<bool>(nullable: false), |
|
|
|
SlidingRefreshTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(nullable: false) |
|
|
|
AbsoluteRefreshTokenLifetime = table.Column<int>(type: "int", nullable: false), |
|
|
|
AccessTokenLifetime = table.Column<int>(type: "int", nullable: false), |
|
|
|
AccessTokenType = table.Column<int>(type: "int", nullable: false), |
|
|
|
AllowAccessTokensViaBrowser = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
AllowOfflineAccess = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
AllowPlainTextPkce = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
AllowRememberConsent = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
AlwaysSendClientClaims = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
AuthorizationCodeLifetime = table.Column<int>(type: "int", nullable: false), |
|
|
|
BackChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
BackChannelLogoutUri = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
|
|
ClientId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), |
|
|
|
ClientName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), |
|
|
|
ClientUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true), |
|
|
|
ConsentLifetime = table.Column<int>(type: "int", nullable: true), |
|
|
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true), |
|
|
|
EnableLocalLogin = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
Enabled = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
FrontChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
FrontChannelLogoutUri = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
|
|
IdentityTokenLifetime = table.Column<int>(type: "int", nullable: false), |
|
|
|
IncludeJwtId = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
LogoUri = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
|
|
NormalizedClientId = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|
|
|
PrefixClientClaims = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
ProtocolType = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), |
|
|
|
RefreshTokenExpiration = table.Column<int>(type: "int", nullable: false), |
|
|
|
RefreshTokenUsage = table.Column<int>(type: "int", nullable: false), |
|
|
|
RequireClientSecret = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
RequireConsent = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
RequirePkce = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
SlidingRefreshTokenLifetime = table.Column<int>(type: "int", nullable: false), |
|
|
|
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(type: "bit", nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -70,15 +75,15 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "IdentityResources", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Emphasize = table.Column<bool>(nullable: false), |
|
|
|
Enabled = table.Column<bool>(nullable: false), |
|
|
|
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
Required = table.Column<bool>(nullable: false), |
|
|
|
ShowInDiscoveryDocument = table.Column<bool>(nullable: false) |
|
|
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true), |
|
|
|
DisplayName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), |
|
|
|
Emphasize = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
Enabled = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), |
|
|
|
Required = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
ShowInDiscoveryDocument = table.Column<bool>(type: "bit", nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -89,10 +94,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ApiResourceId = table.Column<int>(nullable: false), |
|
|
|
Type = table.Column<string>(maxLength: 200, nullable: false) |
|
|
|
ApiResourceId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -109,15 +114,15 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiScopes", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ApiResourceId = table.Column<int>(nullable: false), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Emphasize = table.Column<bool>(nullable: false), |
|
|
|
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
Required = table.Column<bool>(nullable: false), |
|
|
|
ShowInDiscoveryDocument = table.Column<bool>(nullable: false) |
|
|
|
ApiResourceId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true), |
|
|
|
DisplayName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), |
|
|
|
Emphasize = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), |
|
|
|
Required = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
ShowInDiscoveryDocument = table.Column<bool>(type: "bit", nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -134,13 +139,13 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiSecrets", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ApiResourceId = table.Column<int>(nullable: false), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
Expiration = table.Column<DateTime>(nullable: true), |
|
|
|
Type = table.Column<string>(maxLength: 250, nullable: true), |
|
|
|
Value = table.Column<string>(maxLength: 2000, nullable: true) |
|
|
|
ApiResourceId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true), |
|
|
|
Expiration = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
|
|
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true), |
|
|
|
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -157,11 +162,11 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
Type = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
Value = table.Column<string>(maxLength: 250, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false), |
|
|
|
Value = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -178,10 +183,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientCorsOrigins", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
Origin = table.Column<string>(maxLength: 150, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Origin = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -198,10 +203,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientGrantTypes", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
GrantType = table.Column<string>(maxLength: 250, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
GrantType = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -218,10 +223,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientIdPRestrictions", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
Provider = table.Column<string>(maxLength: 200, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Provider = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -238,10 +243,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientPostLogoutRedirectUris", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
PostLogoutRedirectUri = table.Column<string>(maxLength: 2000, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
PostLogoutRedirectUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -254,14 +259,35 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
onDelete: ReferentialAction.Cascade); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "ClientProperties", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false), |
|
|
|
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
|
table.PrimaryKey("PK_ClientProperties", x => x.Id); |
|
|
|
table.ForeignKey( |
|
|
|
name: "FK_ClientProperties_Clients_ClientId", |
|
|
|
column: x => x.ClientId, |
|
|
|
principalTable: "Clients", |
|
|
|
principalColumn: "Id", |
|
|
|
onDelete: ReferentialAction.Cascade); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "ClientRedirectUris", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
RedirectUri = table.Column<string>(maxLength: 2000, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
RedirectUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -278,10 +304,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientScopes", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
Scope = table.Column<string>(maxLength: 200, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Scope = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -298,13 +324,13 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientSecrets", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(nullable: false), |
|
|
|
Description = table.Column<string>(maxLength: 2000, nullable: true), |
|
|
|
Expiration = table.Column<DateTime>(nullable: true), |
|
|
|
Type = table.Column<string>(maxLength: 250, nullable: true), |
|
|
|
Value = table.Column<string>(maxLength: 2000, nullable: false) |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Description = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true), |
|
|
|
Expiration = table.Column<DateTime>(type: "datetime2", nullable: true), |
|
|
|
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true), |
|
|
|
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -321,10 +347,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "IdentityClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
IdentityResourceId = table.Column<int>(nullable: false), |
|
|
|
Type = table.Column<string>(maxLength: 200, nullable: false) |
|
|
|
IdentityResourceId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -341,10 +367,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiScopeClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ApiScopeId = table.Column<int>(nullable: false), |
|
|
|
Type = table.Column<string>(maxLength: 200, nullable: false) |
|
|
|
ApiScopeId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -357,6 +383,11 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
onDelete: ReferentialAction.Cascade); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiClaims_ApiResourceId", |
|
|
|
table: "ApiClaims", |
|
|
|
column: "ApiResourceId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiResources_Name", |
|
|
|
table: "ApiResources", |
|
|
@ -364,9 +395,9 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiClaims_ApiResourceId", |
|
|
|
table: "ApiClaims", |
|
|
|
column: "ApiResourceId"); |
|
|
|
name: "IX_ApiScopeClaims_ApiScopeId", |
|
|
|
table: "ApiScopeClaims", |
|
|
|
column: "ApiScopeId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiScopes_ApiResourceId", |
|
|
@ -379,22 +410,11 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
column: "Name", |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiScopeClaims_ApiScopeId", |
|
|
|
table: "ApiScopeClaims", |
|
|
|
column: "ApiScopeId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiSecrets_ApiResourceId", |
|
|
|
table: "ApiSecrets", |
|
|
|
column: "ApiResourceId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_Clients_ClientId", |
|
|
|
table: "Clients", |
|
|
|
column: "ClientId", |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ClientClaims_ClientId", |
|
|
|
table: "ClientClaims", |
|
|
@ -420,11 +440,22 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
table: "ClientPostLogoutRedirectUris", |
|
|
|
column: "ClientId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ClientProperties_ClientId", |
|
|
|
table: "ClientProperties", |
|
|
|
column: "ClientId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ClientRedirectUris_ClientId", |
|
|
|
table: "ClientRedirectUris", |
|
|
|
column: "ClientId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_Clients_ClientId", |
|
|
|
table: "Clients", |
|
|
|
column: "ClientId", |
|
|
|
unique: true); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ClientScopes_ClientId", |
|
|
|
table: "ClientScopes", |
|
|
@ -473,6 +504,9 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "ClientPostLogoutRedirectUris"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "ClientProperties"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "ClientRedirectUris"); |
|
|
|
|