Browse Source

Remove `IsUnique`.

pull/12084/head
maliming 4 years ago
parent
commit
a4317b51ef
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 14
      modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20220425082215_Initial.Designer.cs
  2. 12
      modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20220425082215_Initial.cs
  3. 12
      modules/openiddict/app/OpenIddict.Demo.Server/Migrations/ServerDbContextModelSnapshot.cs
  4. 12
      modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/EntityFrameworkCore/OpenIddictDbContextModelCreatingExtensions.cs

14
modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20220405034203_Initial.Designer.cs → modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20220425082215_Initial.Designer.cs

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace OpenIddict.Demo.Server.Migrations
{
[DbContext(typeof(ServerDbContext))]
[Migration("20220405034203_Initial")]
[Migration("20220425082215_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -753,9 +753,7 @@ namespace OpenIddict.Demo.Server.Migrations
b.HasKey("Id");
b.HasIndex("ClientId")
.IsUnique()
.HasFilter("[ClientId] IS NOT NULL");
b.HasIndex("ClientId");
b.ToTable("OpenIddictApplications", (string)null);
});
@ -907,9 +905,7 @@ namespace OpenIddict.Demo.Server.Migrations
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique()
.HasFilter("[Name] IS NOT NULL");
b.HasIndex("Name");
b.ToTable("OpenIddictScopes", (string)null);
});
@ -1001,9 +997,7 @@ namespace OpenIddict.Demo.Server.Migrations
b.HasIndex("AuthorizationId");
b.HasIndex("ReferenceId")
.IsUnique()
.HasFilter("[ReferenceId] IS NOT NULL");
b.HasIndex("ReferenceId");
b.HasIndex("ApplicationId", "Status", "Subject", "Type");

12
modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20220405034203_Initial.cs → modules/openiddict/app/OpenIddict.Demo.Server/Migrations/20220425082215_Initial.cs

@ -655,9 +655,7 @@ namespace OpenIddict.Demo.Server.Migrations
migrationBuilder.CreateIndex(
name: "IX_OpenIddictApplications_ClientId",
table: "OpenIddictApplications",
column: "ClientId",
unique: true,
filter: "[ClientId] IS NOT NULL");
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_OpenIddictAuthorizations_ApplicationId_Status_Subject_Type",
@ -667,9 +665,7 @@ namespace OpenIddict.Demo.Server.Migrations
migrationBuilder.CreateIndex(
name: "IX_OpenIddictScopes_Name",
table: "OpenIddictScopes",
column: "Name",
unique: true,
filter: "[Name] IS NOT NULL");
column: "Name");
migrationBuilder.CreateIndex(
name: "IX_OpenIddictTokens_ApplicationId_Status_Subject_Type",
@ -684,9 +680,7 @@ namespace OpenIddict.Demo.Server.Migrations
migrationBuilder.CreateIndex(
name: "IX_OpenIddictTokens_ReferenceId",
table: "OpenIddictTokens",
column: "ReferenceId",
unique: true,
filter: "[ReferenceId] IS NOT NULL");
column: "ReferenceId");
}
protected override void Down(MigrationBuilder migrationBuilder)

12
modules/openiddict/app/OpenIddict.Demo.Server/Migrations/ServerDbContextModelSnapshot.cs

@ -751,9 +751,7 @@ namespace OpenIddict.Demo.Server.Migrations
b.HasKey("Id");
b.HasIndex("ClientId")
.IsUnique()
.HasFilter("[ClientId] IS NOT NULL");
b.HasIndex("ClientId");
b.ToTable("OpenIddictApplications", (string)null);
});
@ -905,9 +903,7 @@ namespace OpenIddict.Demo.Server.Migrations
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique()
.HasFilter("[Name] IS NOT NULL");
b.HasIndex("Name");
b.ToTable("OpenIddictScopes", (string)null);
});
@ -999,9 +995,7 @@ namespace OpenIddict.Demo.Server.Migrations
b.HasIndex("AuthorizationId");
b.HasIndex("ReferenceId")
.IsUnique()
.HasFilter("[ReferenceId] IS NOT NULL");
b.HasIndex("ReferenceId");
b.HasIndex("ApplicationId", "Status", "Subject", "Type");

12
modules/openiddict/src/Volo.Abp.OpenIddict.EntityFrameworkCore/Volo/Abp/OpenIddict/EntityFrameworkCore/OpenIddictDbContextModelCreatingExtensions.cs

@ -25,8 +25,8 @@ public static class OpenIddictDbContextModelCreatingExtensions
b.ConfigureByConvention();
b.HasIndex(x => x.ClientId)
.IsUnique();
b.HasIndex(x => x.ClientId);
//.IsUnique();
b.Property(x => x.ClientId)
.HasMaxLength(OpenIddictApplicationConsts.ClientIdMaxLength);
@ -74,8 +74,8 @@ public static class OpenIddictDbContextModelCreatingExtensions
b.ConfigureByConvention();
b.HasIndex(x => x.Name)
.IsUnique();
b.HasIndex(x => x.Name);
//.IsUnique();
b.Property(x => x.Name)
.HasMaxLength(OpenIddictScopeConsts.NameMaxLength);
@ -89,8 +89,8 @@ public static class OpenIddictDbContextModelCreatingExtensions
b.ConfigureByConvention();
b.HasIndex(x => x.ReferenceId)
.IsUnique();
b.HasIndex(x => x.ReferenceId);
//.IsUnique();
b.HasIndex(x => new
{

Loading…
Cancel
Save