Browse Source

Recreate Template projects migrations.

pull/4578/head
maliming 6 years ago
parent
commit
cee969f7bb
  1. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs
  2. 4
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs
  3. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs
  4. 20
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs
  5. 4
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs
  6. 29
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs
  7. 24
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs
  8. 14
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs
  9. 22
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs
  10. 294
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs
  11. 217
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs
  12. 292
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs
  13. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs
  14. 0
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.cs

6
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs

@ -4,8 +4,10 @@
{
public static int NameMaxLength { get; set; } = 200;
public static int DisplayNameMaxLength { get; set; } = 200;
public static int DisplayNameMaxLength { get; set; } = 200;
public static int DescriptionMaxLength { get; set; } = 1000;
public static int DescriptionMaxLength { get; set; } = 1000;
public static int AllowedAccessTokenSigningAlgorithmsMaxLength { get; set; } = 100;
}
}

4
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs → modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs

@ -1,6 +1,6 @@
namespace Volo.Abp.IdentityServer
namespace Volo.Abp.IdentityServer.ApiResources
{
public class SecretConsts
public class ApiResourceSecretConsts
{
/// <summary>
/// Default value: 250

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs

@ -23,5 +23,7 @@
public static int PairWiseSubjectSaltMaxLength { get; set; } = 200;
public static int UserCodeTypeMaxLength { get; set; } = 100;
public static int AllowedIdentityTokenSigningAlgorithms { get; set; } = 100;
}
}

20
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs

@ -0,0 +1,20 @@
namespace Volo.Abp.IdentityServer.Clients
{
public class ClientSecretConsts
{
/// <summary>
/// Default value: 250
/// </summary>
public static int TypeMaxLength { get; set; } = 250;
/// <summary>
/// Default value: 4000
/// </summary>
public static int ValueMaxLength { get; set; } = 4000;
/// <summary>
/// Default value: 2000
/// </summary>
public static int DescriptionMaxLength { get; set; } = 2000;
}
}

4
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientProperty.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.IdentityServer.Clients
}
public virtual bool Equals(Guid clientId, [NotNull] string key, string value)
public virtual bool Equals(Guid clientId, [NotNull] string key, [NotNull] string value)
{
return ClientId == clientId && Key == key && Value == value;
}
@ -36,4 +36,4 @@ namespace Volo.Abp.IdentityServer.Clients
return new object[] { ClientId, Key };
}
}
}
}

29
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs

@ -50,6 +50,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.Property(x => x.ClientClaimsPrefix).HasMaxLength(ClientConsts.ClientClaimsPrefixMaxLength);
b.Property(x => x.PairWiseSubjectSalt).HasMaxLength(ClientConsts.PairWiseSubjectSaltMaxLength);
b.Property(x => x.UserCodeType).HasMaxLength(ClientConsts.UserCodeTypeMaxLength);
b.Property(x => x.AllowedIdentityTokenSigningAlgorithms).HasMaxLength(ClientConsts.AllowedIdentityTokenSigningAlgorithms);
b.HasMany(x => x.AllowedScopes).WithOne().HasForeignKey(x => x.ClientId).IsRequired();
b.HasMany(x => x.ClientSecrets).WithOne().HasForeignKey(x => x.ClientId).IsRequired();
@ -128,16 +129,13 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.HasKey(x => new {x.ClientId, x.Type, x.Value});
b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired();
b.Property(x => x.Type).HasMaxLength(ClientSecretConsts.TypeMaxLength).IsRequired();
if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle))
{
SecretConsts.ValueMaxLength = 300;
ClientSecretConsts.ValueMaxLength = 300;
}
b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength);
b.Property(x => x.Value).HasMaxLength(ClientSecretConsts.ValueMaxLength).IsRequired();
b.Property(x => x.Description).HasMaxLength(ClientSecretConsts.DescriptionMaxLength);
});
builder.Entity<ClientClaim>(b =>
@ -180,7 +178,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.ConfigureByConvention();
b.HasKey(x => new {x.ClientId, x.Key});
b.HasKey(x => new {x.ClientId, x.Key, x.Value});
b.Property(x => x.Key).HasMaxLength(ClientPropertyConsts.KeyMaxLength).IsRequired();
b.Property(x => x.Value).HasMaxLength(ClientPropertyConsts.ValueMaxLength).IsRequired();
@ -223,7 +221,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.ConfigureByConvention();
b.HasKey(x => new {x.IdentityResourceId, x.Key});
b.HasKey(x => new {x.IdentityResourceId, x.Key, x.Value});
b.Property(x => x.Key).HasMaxLength(IdentityResourcePropertyConsts.KeyMaxLength).IsRequired();
if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle))
@ -248,6 +246,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.Property(x => x.Name).HasMaxLength(ApiResourceConsts.NameMaxLength).IsRequired();
b.Property(x => x.DisplayName).HasMaxLength(ApiResourceConsts.DisplayNameMaxLength);
b.Property(x => x.Description).HasMaxLength(ApiResourceConsts.DescriptionMaxLength);
b.Property(x => x.AllowedAccessTokenSigningAlgorithms).HasMaxLength(ApiResourceConsts.AllowedAccessTokenSigningAlgorithmsMaxLength);
b.HasMany(x => x.Secrets).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired();
b.HasMany(x => x.Scopes).WithOne().HasForeignKey(x => x.ApiResourceId).IsRequired();
@ -263,15 +262,15 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.HasKey(x => new {x.ApiResourceId, x.Type, x.Value});
b.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired();
b.Property(x => x.Type).HasMaxLength(ApiResourceSecretConsts.TypeMaxLength).IsRequired();
if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle))
{
SecretConsts.ValueMaxLength = 300;
ApiResourceSecretConsts.ValueMaxLength = 300;
}
b.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
b.Property(x => x.Value).HasMaxLength(ApiResourceSecretConsts.ValueMaxLength).IsRequired();
b.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength);
b.Property(x => x.Description).HasMaxLength(ApiResourceSecretConsts.DescriptionMaxLength);
});
builder.Entity<ApiResourceClaim>(b =>
@ -302,7 +301,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.ConfigureByConvention();
b.HasKey(x => new {x.ApiResourceId, x.Key});
b.HasKey(x => new {x.ApiResourceId, x.Key, x.Value});
b.Property(x => x.Key).HasMaxLength(ApiResourcePropertyConsts.KeyMaxLength).IsRequired();
if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle))
@ -349,7 +348,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.ConfigureByConvention();
b.HasKey(x => new {x.ApiScopeId, x.Key});
b.HasKey(x => new {x.ApiScopeId, x.Key, x.Value});
b.Property(x => x.Key).HasMaxLength(ApiScopePropertyConsts.KeyMaxLength).IsRequired();
if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql, EfCoreDatabaseProvider.Oracle))

24
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.Designer.cs → templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.Designer.cs

@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(MyProjectNameMigrationsDbContext))]
[Migration("20200707050900_Initial")]
[Migration("20200707075540_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -873,11 +873,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiResourceId", "Key");
b.HasKey("ApiResourceId", "Key", "Value");
b.ToTable("IdentityServerApiResourceProperties");
});
@ -889,7 +888,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("AllowedAccessTokenSigningAlgorithms")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -1114,11 +1114,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiScopeId", "Key");
b.HasKey("ApiScopeId", "Key", "Value");
b.ToTable("IdentityServerApiScopeProperties");
});
@ -1151,7 +1150,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("bit");
b.Property<string>("AllowedIdentityTokenSigningAlgorithms")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("bit");
@ -1390,11 +1390,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.HasKey("ClientId", "Key", "Value");
b.ToTable("IdentityServerClientProperties");
});
@ -1441,8 +1440,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1693,11 +1692,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("IdentityResourceId", "Key");
b.HasKey("IdentityResourceId", "Key", "Value");
b.ToTable("IdentityServerIdentityResourceProperties");
});

14
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707050900_Initial.cs → templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20200707075540_Initial.cs

@ -249,7 +249,7 @@ namespace MyCompanyName.MyProjectName.Migrations
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(nullable: false),
AllowedAccessTokenSigningAlgorithms = table.Column<string>(nullable: true),
AllowedAccessTokenSigningAlgorithms = table.Column<string>(maxLength: 100, nullable: true),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
@ -319,7 +319,7 @@ namespace MyCompanyName.MyProjectName.Migrations
BackChannelLogoutSessionRequired = table.Column<bool>(nullable: false),
AllowOfflineAccess = table.Column<bool>(nullable: false),
IdentityTokenLifetime = table.Column<int>(nullable: false),
AllowedIdentityTokenSigningAlgorithms = table.Column<string>(nullable: true),
AllowedIdentityTokenSigningAlgorithms = table.Column<string>(maxLength: 100, nullable: true),
AccessTokenLifetime = table.Column<int>(nullable: false),
AuthorizationCodeLifetime = table.Column<int>(nullable: false),
ConsentLifetime = table.Column<int>(nullable: true),
@ -676,7 +676,7 @@ namespace MyCompanyName.MyProjectName.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key });
table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
@ -752,7 +752,7 @@ namespace MyCompanyName.MyProjectName.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key });
table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId",
column: x => x.ApiScopeId,
@ -862,7 +862,7 @@ namespace MyCompanyName.MyProjectName.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key });
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId",
column: x => x.ClientId,
@ -914,7 +914,7 @@ namespace MyCompanyName.MyProjectName.Migrations
Type = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 4000, nullable: false),
ClientId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Description = table.Column<string>(maxLength: 2000, nullable: true),
Expiration = table.Column<DateTime>(nullable: true)
},
constraints: table =>
@ -956,7 +956,7 @@ namespace MyCompanyName.MyProjectName.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key });
table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId",
column: x => x.IdentityResourceId,

22
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs

@ -871,11 +871,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiResourceId", "Key");
b.HasKey("ApiResourceId", "Key", "Value");
b.ToTable("IdentityServerApiResourceProperties");
});
@ -887,7 +886,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("AllowedAccessTokenSigningAlgorithms")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -1112,11 +1112,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiScopeId", "Key");
b.HasKey("ApiScopeId", "Key", "Value");
b.ToTable("IdentityServerApiScopeProperties");
});
@ -1149,7 +1148,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("bit");
b.Property<string>("AllowedIdentityTokenSigningAlgorithms")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("bit");
@ -1388,11 +1388,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.HasKey("ClientId", "Key", "Value");
b.ToTable("IdentityServerClientProperties");
});
@ -1439,8 +1438,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1691,11 +1690,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("IdentityResourceId", "Key");
b.HasKey("IdentityResourceId", "Key", "Value");
b.ToTable("IdentityServerIdentityResourceProperties");
});

294
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.Designer.cs → templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.Designer.cs

@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(IdentityServerHostMigrationsDbContext))]
[Migration("20200624023331_Initial")]
[Migration("20200707075532_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -774,12 +774,34 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpOrganizationUnitRoles");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiResourceId", "Key", "Value");
b.ToTable("IdentityServerApiResourceProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("AllowedAccessTokenSigningAlgorithms")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
@ -836,15 +858,18 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
@ -855,18 +880,76 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("ApiResourceId", "Type");
b.ToTable("IdentityServerApiClaims");
b.ToTable("IdentityServerApiResourceClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
b.Property<string>("Scope")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Scope");
b.ToTable("IdentityServerApiResourceScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiResourceSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(40)")
.HasMaxLength(40);
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
@ -878,58 +961,76 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("ApiResourceId", "Name");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b =>
{
b.Property<Guid>("ApiResourceId")
b.Property<Guid>("ApiScopeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Name", "Type");
b.HasKey("ApiScopeId", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b =>
{
b.Property<Guid>("ApiResourceId")
b.Property<Guid>("ApiScopeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ApiScopeId", "Key", "Value");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiSecrets");
b.ToTable("IdentityServerApiScopeProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
@ -959,6 +1060,10 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<bool>("AllowRememberConsent")
.HasColumnType("bit");
b.Property<string>("AllowedIdentityTokenSigningAlgorithms")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("bit");
@ -1089,6 +1194,9 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<bool>("RequirePkce")
.HasColumnType("bit");
b.Property<bool>("RequireRequestObject")
.HasColumnType("bit");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("int");
@ -1193,11 +1301,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.HasKey("ClientId", "Key", "Value");
b.ToTable("IdentityServerClientProperties");
});
@ -1285,6 +1392,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("DeviceCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
@ -1298,6 +1409,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
@ -1314,8 +1429,7 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("Expiration");
b.HasIndex("UserCode")
.IsUnique();
b.HasIndex("UserCode");
b.ToTable("IdentityServerDeviceFlowCodes");
});
@ -1337,6 +1451,9 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(40)")
.HasMaxLength(40);
b.Property<DateTime?>("ConsumedTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
@ -1345,6 +1462,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1355,6 +1476,10 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
@ -1370,21 +1495,9 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("SubjectId", "ClientId", "Type");
b.ToTable("IdentityServerPersistedGrants");
});
b.HasIndex("SubjectId", "SessionId", "Type");
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityClaims");
b.ToTable("IdentityServerPersistedGrants");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
@ -1452,9 +1565,6 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Required")
.HasColumnType("bit");
@ -1463,9 +1573,44 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerIdentityResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityResourceClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("IdentityResourceId", "Key", "Value");
b.ToTable("IdentityServerIdentityResourceProperties");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
@ -1721,38 +1866,56 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Properties")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null)
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId", "Name")
.HasForeignKey("ApiScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null)
.WithMany("Properties")
.HasForeignKey("ApiScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
@ -1838,7 +2001,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null)
.WithMany("UserClaims")
@ -1847,6 +2010,15 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null)
.WithMany("Properties")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)

217
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200624023331_Initial.cs → templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20200707075532_Initial.cs

@ -213,13 +213,41 @@ namespace MyCompanyName.MyProjectName.Migrations
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(nullable: false),
Properties = table.Column<string>(nullable: true)
AllowedAccessTokenSigningAlgorithms = table.Column<string>(maxLength: 100, nullable: true),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiScopes",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
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)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerClients",
columns: table => new
@ -247,6 +275,7 @@ namespace MyCompanyName.MyProjectName.Migrations
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(nullable: false),
RequirePkce = table.Column<bool>(nullable: false),
AllowPlainTextPkce = table.Column<bool>(nullable: false),
RequireRequestObject = 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),
@ -254,6 +283,7 @@ namespace MyCompanyName.MyProjectName.Migrations
BackChannelLogoutSessionRequired = table.Column<bool>(nullable: false),
AllowOfflineAccess = table.Column<bool>(nullable: false),
IdentityTokenLifetime = table.Column<int>(nullable: false),
AllowedIdentityTokenSigningAlgorithms = table.Column<string>(maxLength: 100, nullable: true),
AccessTokenLifetime = table.Column<int>(nullable: false),
AuthorizationCodeLifetime = table.Column<int>(nullable: false),
ConsentLifetime = table.Column<int>(nullable: true),
@ -289,7 +319,9 @@ namespace MyCompanyName.MyProjectName.Migrations
DeviceCode = table.Column<string>(maxLength: 200, nullable: false),
UserCode = table.Column<string>(maxLength: 200, nullable: false),
SubjectId = table.Column<string>(maxLength: 200, nullable: true),
SessionId = table.Column<string>(maxLength: 100, nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
Description = table.Column<string>(maxLength: 200, nullable: true),
Expiration = table.Column<DateTime>(nullable: false),
Data = table.Column<string>(maxLength: 50000, nullable: false)
},
@ -318,8 +350,7 @@ namespace MyCompanyName.MyProjectName.Migrations
Enabled = table.Column<bool>(nullable: false),
Required = table.Column<bool>(nullable: false),
Emphasize = table.Column<bool>(nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false),
Properties = table.Column<string>(nullable: true)
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
{
@ -336,9 +367,12 @@ namespace MyCompanyName.MyProjectName.Migrations
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true),
Type = table.Column<string>(maxLength: 50, nullable: false),
SubjectId = table.Column<string>(maxLength: 200, nullable: true),
SessionId = table.Column<string>(maxLength: 100, nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
Description = table.Column<string>(maxLength: 200, nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
Expiration = table.Column<DateTime>(nullable: true),
ConsumedTime = table.Column<DateTime>(nullable: true),
Data = table.Column<string>(maxLength: 50000, nullable: false)
},
constraints: table =>
@ -579,7 +613,7 @@ namespace MyCompanyName.MyProjectName.Migrations
});
migrationBuilder.CreateTable(
name: "IdentityServerApiClaims",
name: "IdentityServerApiResourceClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 200, nullable: false),
@ -587,9 +621,9 @@ namespace MyCompanyName.MyProjectName.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type });
table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResourceId",
name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
@ -597,22 +631,36 @@ namespace MyCompanyName.MyProjectName.Migrations
});
migrationBuilder.CreateTable(
name: "IdentityServerApiScopes",
name: "IdentityServerApiResourceProperties",
columns: table => new
{
ApiResourceId = table.Column<Guid>(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)
Key = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(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<Guid>(nullable: false),
Scope = table.Column<string>(maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name });
table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope });
table.ForeignKey(
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResourceId",
name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
@ -620,26 +668,63 @@ namespace MyCompanyName.MyProjectName.Migrations
});
migrationBuilder.CreateTable(
name: "IdentityServerApiSecrets",
name: "IdentityServerApiResourceSecrets",
columns: table => new
{
Type = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 4000, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 2000, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Expiration = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value });
table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value });
table.ForeignKey(
name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResourceId",
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<string>(maxLength: 200, nullable: false),
ApiScopeId = table.Column<Guid>(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<Guid>(nullable: false),
Key = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(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
@ -741,7 +826,7 @@ namespace MyCompanyName.MyProjectName.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key });
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId",
column: x => x.ClientId,
@ -808,7 +893,7 @@ namespace MyCompanyName.MyProjectName.Migrations
});
migrationBuilder.CreateTable(
name: "IdentityServerIdentityClaims",
name: "IdentityServerIdentityResourceClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 200, nullable: false),
@ -816,9 +901,28 @@ namespace MyCompanyName.MyProjectName.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type });
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<Guid>(nullable: false),
Key = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources_IdentityResourceId",
name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId",
column: x => x.IdentityResourceId,
principalTable: "IdentityServerIdentityResources",
principalColumn: "Id",
@ -848,25 +952,6 @@ namespace MyCompanyName.MyProjectName.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiScopeClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 200, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiResourceId, x.Name, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiResourceId_Name",
columns: x => new { x.ApiResourceId, x.Name },
principalTable: "IdentityServerApiScopes",
principalColumns: new[] { "ApiResourceId", "Name" },
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_AuditLogId",
table: "AbpAuditLogActions",
@ -982,6 +1067,18 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpUsers",
column: "UserName");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerApiResources_Name",
table: "IdentityServerApiResources",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_IdentityServerApiScopes_Name",
table: "IdentityServerApiScopes",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_IdentityServerClients_ClientId",
table: "IdentityServerClients",
@ -1001,7 +1098,12 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.CreateIndex(
name: "IX_IdentityServerDeviceFlowCodes_UserCode",
table: "IdentityServerDeviceFlowCodes",
column: "UserCode",
column: "UserCode");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerIdentityResources_Name",
table: "IdentityServerIdentityResources",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
@ -1013,6 +1115,11 @@ namespace MyCompanyName.MyProjectName.Migrations
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)
@ -1057,13 +1164,22 @@ namespace MyCompanyName.MyProjectName.Migrations
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "IdentityServerApiClaims");
name: "IdentityServerApiResourceClaims");
migrationBuilder.DropTable(
name: "IdentityServerApiResourceProperties");
migrationBuilder.DropTable(
name: "IdentityServerApiResourceScopes");
migrationBuilder.DropTable(
name: "IdentityServerApiResourceSecrets");
migrationBuilder.DropTable(
name: "IdentityServerApiScopeClaims");
migrationBuilder.DropTable(
name: "IdentityServerApiSecrets");
name: "IdentityServerApiScopeProperties");
migrationBuilder.DropTable(
name: "IdentityServerClientClaims");
@ -1096,7 +1212,10 @@ namespace MyCompanyName.MyProjectName.Migrations
name: "IdentityServerDeviceFlowCodes");
migrationBuilder.DropTable(
name: "IdentityServerIdentityClaims");
name: "IdentityServerIdentityResourceClaims");
migrationBuilder.DropTable(
name: "IdentityServerIdentityResourceProperties");
migrationBuilder.DropTable(
name: "IdentityServerPersistedGrants");
@ -1116,6 +1235,9 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable(
name: "AbpUsers");
migrationBuilder.DropTable(
name: "IdentityServerApiResources");
migrationBuilder.DropTable(
name: "IdentityServerApiScopes");
@ -1127,9 +1249,6 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable(
name: "AbpAuditLogs");
migrationBuilder.DropTable(
name: "IdentityServerApiResources");
}
}
}

292
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs

@ -772,12 +772,34 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpOrganizationUnitRoles");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiResourceId", "Key", "Value");
b.ToTable("IdentityServerApiResourceProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("AllowedAccessTokenSigningAlgorithms")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
@ -834,15 +856,18 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
@ -853,18 +878,76 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("ApiResourceId", "Type");
b.ToTable("IdentityServerApiClaims");
b.ToTable("IdentityServerApiResourceClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
b.Property<string>("Scope")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Scope");
b.ToTable("IdentityServerApiResourceScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiResourceSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(40)")
.HasMaxLength(40);
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
@ -876,58 +959,76 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<bool>("Emphasize")
.HasColumnType("bit");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasColumnType("bit")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("ApiResourceId", "Name");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b =>
{
b.Property<Guid>("ApiResourceId")
b.Property<Guid>("ApiScopeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiResourceId", "Name", "Type");
b.HasKey("ApiScopeId", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b =>
{
b.Property<Guid>("ApiResourceId")
b.Property<Guid>("ApiScopeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
b.HasKey("ApiScopeId", "Key", "Value");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiSecrets");
b.ToTable("IdentityServerApiScopeProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
@ -957,6 +1058,10 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<bool>("AllowRememberConsent")
.HasColumnType("bit");
b.Property<string>("AllowedIdentityTokenSigningAlgorithms")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("bit");
@ -1087,6 +1192,9 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<bool>("RequirePkce")
.HasColumnType("bit");
b.Property<bool>("RequireRequestObject")
.HasColumnType("bit");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("int");
@ -1191,11 +1299,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.HasKey("ClientId", "Key", "Value");
b.ToTable("IdentityServerClientProperties");
});
@ -1283,6 +1390,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("DeviceCode")
.IsRequired()
.HasColumnType("nvarchar(200)")
@ -1296,6 +1407,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
@ -1312,8 +1427,7 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("Expiration");
b.HasIndex("UserCode")
.IsUnique();
b.HasIndex("UserCode");
b.ToTable("IdentityServerDeviceFlowCodes");
});
@ -1335,6 +1449,9 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(40)")
.HasMaxLength(40);
b.Property<DateTime?>("ConsumedTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
@ -1343,6 +1460,10 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(max)")
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1353,6 +1474,10 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
@ -1368,21 +1493,9 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("SubjectId", "ClientId", "Type");
b.ToTable("IdentityServerPersistedGrants");
});
b.HasIndex("SubjectId", "SessionId", "Type");
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityClaims");
b.ToTable("IdentityServerPersistedGrants");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
@ -1450,9 +1563,6 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("Required")
.HasColumnType("bit");
@ -1461,9 +1571,44 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerIdentityResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityResourceClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b =>
{
b.Property<Guid>("IdentityResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("IdentityResourceId", "Key", "Value");
b.ToTable("IdentityServerIdentityResourceProperties");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
@ -1719,38 +1864,56 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Properties")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceScope", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceSecret", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope", null)
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null)
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId", "Name")
.HasForeignKey("ApiScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource", null)
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiScope", null)
.WithMany("Properties")
.HasForeignKey("ApiScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
@ -1836,7 +1999,7 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null)
.WithMany("UserClaims")
@ -1845,6 +2008,15 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", null)
.WithMany("Properties")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200624023340_Initial.Designer.cs → templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.Designer.cs

@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(UnifiedDbContext))]
[Migration("20200624023340_Initial")]
[Migration("20200707075539_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)

0
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200624023340_Initial.cs → templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20200707075539_Initial.cs

Loading…
Cancel
Save