Browse Source

Merge pull request #5966 from abpframework/maliming/id4-unique-migrations

Remove the unique index of IdentityResource, ApiResource and ApiScope.
pull/5984/head
Halil İbrahim Kalkan 6 years ago
committed by GitHub
parent
commit
9b3a41c1ec
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs
  2. 11
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.Designer.cs
  3. 18
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.cs
  4. 9
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/MyProjectNameMigrationsDbContextModelSnapshot.cs
  5. 11
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201028014236_Initial.Designer.cs
  6. 18
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201028014236_Initial.cs
  7. 9
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs
  8. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201028014311_Initial.Designer.cs
  9. 0
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20201028014311_Initial.cs

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

@ -193,8 +193,6 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.Property(x => x.DisplayName).HasMaxLength(IdentityResourceConsts.DisplayNameMaxLength); b.Property(x => x.DisplayName).HasMaxLength(IdentityResourceConsts.DisplayNameMaxLength);
b.Property(x => x.Description).HasMaxLength(IdentityResourceConsts.DescriptionMaxLength); b.Property(x => x.Description).HasMaxLength(IdentityResourceConsts.DescriptionMaxLength);
b.HasIndex(x => x.Name).IsUnique();
b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired(); b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired();
b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired(); b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.IdentityResourceId).IsRequired();
}); });
@ -236,8 +234,6 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.ConfigureByConvention(); b.ConfigureByConvention();
b.HasIndex(x => x.Name).IsUnique();
b.Property(x => x.Name).HasMaxLength(ApiResourceConsts.NameMaxLength).IsRequired(); b.Property(x => x.Name).HasMaxLength(ApiResourceConsts.NameMaxLength).IsRequired();
b.Property(x => x.DisplayName).HasMaxLength(ApiResourceConsts.DisplayNameMaxLength); b.Property(x => x.DisplayName).HasMaxLength(ApiResourceConsts.DisplayNameMaxLength);
b.Property(x => x.Description).HasMaxLength(ApiResourceConsts.DescriptionMaxLength); b.Property(x => x.Description).HasMaxLength(ApiResourceConsts.DescriptionMaxLength);
@ -320,8 +316,6 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
b.Property(x => x.DisplayName).HasMaxLength(ApiScopeConsts.DisplayNameMaxLength); b.Property(x => x.DisplayName).HasMaxLength(ApiScopeConsts.DisplayNameMaxLength);
b.Property(x => x.Description).HasMaxLength(ApiScopeConsts.DescriptionMaxLength); b.Property(x => x.Description).HasMaxLength(ApiScopeConsts.DescriptionMaxLength);
b.HasIndex(x => x.Name).IsUnique();
b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); b.HasMany(x => x.UserClaims).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired();
b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired(); b.HasMany(x => x.Properties).WithOne().HasForeignKey(x => x.ApiScopeId).IsRequired();
}); });

11
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.Designer.cs → templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.Designer.cs

@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations namespace MyCompanyName.MyProjectName.Migrations
{ {
[DbContext(typeof(MyProjectNameMigrationsDbContext))] [DbContext(typeof(MyProjectNameMigrationsDbContext))]
[Migration("20201019020935_Initial")] [Migration("20201028014149_Initial")]
partial class Initial partial class Initial
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -1042,9 +1042,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources"); b.ToTable("IdentityServerApiResources");
}); });
@ -1192,9 +1189,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiScopes"); b.ToTable("IdentityServerApiScopes");
}); });
@ -1770,9 +1764,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerIdentityResources"); b.ToTable("IdentityServerIdentityResources");
}); });

18
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201019020935_Initial.cs → templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.cs

@ -1181,18 +1181,6 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpUsers", table: "AbpUsers",
column: "UserName"); 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( migrationBuilder.CreateIndex(
name: "IX_IdentityServerClients_ClientId", name: "IX_IdentityServerClients_ClientId",
table: "IdentityServerClients", table: "IdentityServerClients",
@ -1214,12 +1202,6 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "IdentityServerDeviceFlowCodes", table: "IdentityServerDeviceFlowCodes",
column: "UserCode"); column: "UserCode");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerIdentityResources_Name",
table: "IdentityServerIdentityResources",
column: "Name",
unique: true);
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_IdentityServerPersistedGrants_Expiration", name: "IX_IdentityServerPersistedGrants_Expiration",
table: "IdentityServerPersistedGrants", table: "IdentityServerPersistedGrants",

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

@ -1040,9 +1040,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources"); b.ToTable("IdentityServerApiResources");
}); });
@ -1190,9 +1187,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiScopes"); b.ToTable("IdentityServerApiScopes");
}); });
@ -1768,9 +1762,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerIdentityResources"); b.ToTable("IdentityServerIdentityResources");
}); });

11
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.Designer.cs → templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201028014236_Initial.Designer.cs

@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations namespace MyCompanyName.MyProjectName.Migrations
{ {
[DbContext(typeof(IdentityServerHostMigrationsDbContext))] [DbContext(typeof(IdentityServerHostMigrationsDbContext))]
[Migration("20201019021120_Initial")] [Migration("20201028014236_Initial")]
partial class Initial partial class Initial
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -984,9 +984,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources"); b.ToTable("IdentityServerApiResources");
}); });
@ -1134,9 +1131,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiScopes"); b.ToTable("IdentityServerApiScopes");
}); });
@ -1712,9 +1706,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerIdentityResources"); b.ToTable("IdentityServerIdentityResources");
}); });

18
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201019021120_Initial.cs → templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20201028014236_Initial.cs

@ -1155,18 +1155,6 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpUsers", table: "AbpUsers",
column: "UserName"); 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( migrationBuilder.CreateIndex(
name: "IX_IdentityServerClients_ClientId", name: "IX_IdentityServerClients_ClientId",
table: "IdentityServerClients", table: "IdentityServerClients",
@ -1188,12 +1176,6 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "IdentityServerDeviceFlowCodes", table: "IdentityServerDeviceFlowCodes",
column: "UserCode"); column: "UserCode");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerIdentityResources_Name",
table: "IdentityServerIdentityResources",
column: "Name",
unique: true);
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_IdentityServerPersistedGrants_Expiration", name: "IX_IdentityServerPersistedGrants_Expiration",
table: "IdentityServerPersistedGrants", table: "IdentityServerPersistedGrants",

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

@ -982,9 +982,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources"); b.ToTable("IdentityServerApiResources");
}); });
@ -1132,9 +1129,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiScopes"); b.ToTable("IdentityServerApiScopes");
}); });
@ -1710,9 +1704,6 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerIdentityResources"); b.ToTable("IdentityServerIdentityResources");
}); });

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

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

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

Loading…
Cancel
Save