|
|
@ -1,6 +1,6 @@ |
|
|
|
using Microsoft.EntityFrameworkCore.Metadata; |
|
|
|
using System; |
|
|
|
using Microsoft.EntityFrameworkCore.Metadata; |
|
|
|
using Microsoft.EntityFrameworkCore.Migrations; |
|
|
|
using System; |
|
|
|
|
|
|
|
namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
{ |
|
|
@ -12,12 +12,16 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiResources", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
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) |
|
|
|
Enabled = table.Column<bool>(nullable: false), |
|
|
|
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
Created = table.Column<DateTime>(nullable: false), |
|
|
|
Updated = table.Column<DateTime>(nullable: true), |
|
|
|
LastAccessed = table.Column<DateTime>(nullable: true), |
|
|
|
NonEditable = table.Column<bool>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -28,42 +32,49 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "Clients", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
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(2000)", maxLength: 2000, nullable: true), |
|
|
|
ClientClaimsPrefix = table.Column<string>(type: "nvarchar(200)", maxLength: 200, 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(2000)", maxLength: 2000, nullable: true), |
|
|
|
IdentityTokenLifetime = table.Column<int>(type: "int", nullable: false), |
|
|
|
IncludeJwtId = table.Column<bool>(type: "bit", nullable: false), |
|
|
|
LogoUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true), |
|
|
|
PairWiseSubjectSalt = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true), |
|
|
|
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) |
|
|
|
Enabled = table.Column<bool>(nullable: false), |
|
|
|
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
ProtocolType = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
RequireClientSecret = table.Column<bool>(nullable: false), |
|
|
|
ClientName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
ClientUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
|
|
LogoUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
|
|
RequireConsent = table.Column<bool>(nullable: false), |
|
|
|
AllowRememberConsent = table.Column<bool>(nullable: false), |
|
|
|
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(nullable: false), |
|
|
|
RequirePkce = table.Column<bool>(nullable: false), |
|
|
|
AllowPlainTextPkce = table.Column<bool>(nullable: false), |
|
|
|
AllowAccessTokensViaBrowser = table.Column<bool>(nullable: false), |
|
|
|
FrontChannelLogoutUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
|
|
FrontChannelLogoutSessionRequired = table.Column<bool>(nullable: false), |
|
|
|
BackChannelLogoutUri = table.Column<string>(maxLength: 2000, nullable: true), |
|
|
|
BackChannelLogoutSessionRequired = table.Column<bool>(nullable: false), |
|
|
|
AllowOfflineAccess = table.Column<bool>(nullable: false), |
|
|
|
IdentityTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
AccessTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
AuthorizationCodeLifetime = table.Column<int>(nullable: false), |
|
|
|
ConsentLifetime = table.Column<int>(nullable: true), |
|
|
|
AbsoluteRefreshTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
SlidingRefreshTokenLifetime = table.Column<int>(nullable: false), |
|
|
|
RefreshTokenUsage = table.Column<int>(nullable: false), |
|
|
|
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(nullable: false), |
|
|
|
RefreshTokenExpiration = table.Column<int>(nullable: false), |
|
|
|
AccessTokenType = table.Column<int>(nullable: false), |
|
|
|
EnableLocalLogin = table.Column<bool>(nullable: false), |
|
|
|
IncludeJwtId = table.Column<bool>(nullable: false), |
|
|
|
AlwaysSendClientClaims = table.Column<bool>(nullable: false), |
|
|
|
ClientClaimsPrefix = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
PairWiseSubjectSalt = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Created = table.Column<DateTime>(nullable: false), |
|
|
|
Updated = table.Column<DateTime>(nullable: true), |
|
|
|
LastAccessed = table.Column<DateTime>(nullable: true), |
|
|
|
UserSsoLifetime = table.Column<int>(nullable: true), |
|
|
|
UserCodeType = table.Column<string>(maxLength: 100, nullable: true), |
|
|
|
DeviceCodeLifetime = table.Column<int>(nullable: false), |
|
|
|
NonEditable = table.Column<bool>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -74,15 +85,18 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "IdentityResources", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
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) |
|
|
|
Enabled = table.Column<bool>(nullable: false), |
|
|
|
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
Required = table.Column<bool>(nullable: false), |
|
|
|
Emphasize = table.Column<bool>(nullable: false), |
|
|
|
ShowInDiscoveryDocument = table.Column<bool>(nullable: false), |
|
|
|
Created = table.Column<DateTime>(nullable: false), |
|
|
|
Updated = table.Column<DateTime>(nullable: true), |
|
|
|
NonEditable = table.Column<bool>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -93,10 +107,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ApiResourceId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
Type = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
ApiResourceId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -109,19 +123,40 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
onDelete: ReferentialAction.Cascade); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "ApiProperties", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
Key = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
Value = table.Column<string>(maxLength: 2000, nullable: false), |
|
|
|
ApiResourceId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
|
table.PrimaryKey("PK_ApiProperties", x => x.Id); |
|
|
|
table.ForeignKey( |
|
|
|
name: "FK_ApiProperties_ApiResources_ApiResourceId", |
|
|
|
column: x => x.ApiResourceId, |
|
|
|
principalTable: "ApiResources", |
|
|
|
principalColumn: "Id", |
|
|
|
onDelete: ReferentialAction.Cascade); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "ApiScopes", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
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) |
|
|
|
Name = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
Required = table.Column<bool>(nullable: false), |
|
|
|
Emphasize = table.Column<bool>(nullable: false), |
|
|
|
ShowInDiscoveryDocument = table.Column<bool>(nullable: false), |
|
|
|
ApiResourceId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -138,13 +173,14 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ApiSecrets", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
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) |
|
|
|
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|
|
|
Value = table.Column<string>(maxLength: 4000, nullable: false), |
|
|
|
Expiration = table.Column<DateTime>(nullable: true), |
|
|
|
Type = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
Created = table.Column<DateTime>(nullable: false), |
|
|
|
ApiResourceId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -161,11 +197,11 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
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) |
|
|
|
Type = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
Value = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -182,10 +218,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientCorsOrigins", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Origin = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false) |
|
|
|
Origin = table.Column<string>(maxLength: 150, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -202,10 +238,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientGrantTypes", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
GrantType = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false) |
|
|
|
GrantType = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -222,10 +258,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientIdPRestrictions", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Provider = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
Provider = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -242,10 +278,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientPostLogoutRedirectUris", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
PostLogoutRedirectUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|
|
|
PostLogoutRedirectUri = table.Column<string>(maxLength: 2000, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -262,11 +298,11 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientProperties", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<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) |
|
|
|
Key = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
Value = table.Column<string>(maxLength: 2000, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -283,10 +319,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientRedirectUris", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
RedirectUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|
|
|
RedirectUri = table.Column<string>(maxLength: 2000, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -303,10 +339,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientScopes", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ClientId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Scope = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
Scope = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -323,13 +359,14 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "ClientSecrets", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
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) |
|
|
|
Description = table.Column<string>(maxLength: 2000, nullable: true), |
|
|
|
Value = table.Column<string>(maxLength: 4000, nullable: false), |
|
|
|
Expiration = table.Column<DateTime>(nullable: true), |
|
|
|
Type = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
Created = table.Column<DateTime>(nullable: false), |
|
|
|
ClientId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -346,10 +383,10 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
name: "IdentityClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
IdentityResourceId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
Type = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
IdentityResourceId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -362,14 +399,35 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
onDelete: ReferentialAction.Cascade); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "IdentityProperties", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
Key = table.Column<string>(maxLength: 250, nullable: false), |
|
|
|
Value = table.Column<string>(maxLength: 2000, nullable: false), |
|
|
|
IdentityResourceId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
|
table.PrimaryKey("PK_IdentityProperties", x => x.Id); |
|
|
|
table.ForeignKey( |
|
|
|
name: "FK_IdentityProperties_IdentityResources_IdentityResourceId", |
|
|
|
column: x => x.IdentityResourceId, |
|
|
|
principalTable: "IdentityResources", |
|
|
|
principalColumn: "Id", |
|
|
|
onDelete: ReferentialAction.Cascade); |
|
|
|
}); |
|
|
|
|
|
|
|
migrationBuilder.CreateTable( |
|
|
|
name: "ApiScopeClaims", |
|
|
|
columns: table => new |
|
|
|
{ |
|
|
|
Id = table.Column<int>(type: "int", nullable: false) |
|
|
|
Id = table.Column<int>(nullable: false) |
|
|
|
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), |
|
|
|
ApiScopeId = table.Column<int>(type: "int", nullable: false), |
|
|
|
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|
|
|
Type = table.Column<string>(maxLength: 200, nullable: false), |
|
|
|
ApiScopeId = table.Column<int>(nullable: false) |
|
|
|
}, |
|
|
|
constraints: table => |
|
|
|
{ |
|
|
@ -387,6 +445,11 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
table: "ApiClaims", |
|
|
|
column: "ApiResourceId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiProperties_ApiResourceId", |
|
|
|
table: "ApiProperties", |
|
|
|
column: "ApiResourceId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_ApiResources_Name", |
|
|
|
table: "ApiResources", |
|
|
@ -470,6 +533,11 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
table: "IdentityClaims", |
|
|
|
column: "IdentityResourceId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_IdentityProperties_IdentityResourceId", |
|
|
|
table: "IdentityProperties", |
|
|
|
column: "IdentityResourceId"); |
|
|
|
|
|
|
|
migrationBuilder.CreateIndex( |
|
|
|
name: "IX_IdentityResources_Name", |
|
|
|
table: "IdentityResources", |
|
|
@ -482,6 +550,9 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "ApiClaims"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "ApiProperties"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "ApiScopeClaims"); |
|
|
|
|
|
|
@ -518,6 +589,9 @@ namespace Identity.API.Migrations.ConfigurationDb |
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "IdentityClaims"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "IdentityProperties"); |
|
|
|
|
|
|
|
migrationBuilder.DropTable( |
|
|
|
name: "ApiScopes"); |
|
|
|
|