Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ServerSideSession.Id to long #1463

Merged
merged 2 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion migrations/IdentityServerDb/Migrations/ConfigurationDb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ CREATE UNIQUE INDEX [IX_IdentityResources_Name] ON [IdentityResources] ([Name]);
GO

INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'20231006192633_Configuration', N'8.0.0-preview.7.23375.4');
VALUES (N'20231110071401_Configuration', N'8.0.0-rc.2.23480.1');
GO

COMMIT;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.0-preview.7.23375.4")
.HasAnnotation("ProductVersion", "8.0.0-rc.2.23480.1")
.HasAnnotation("Relational:MaxIdentifierLength", 128);

SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
Expand Down
6 changes: 3 additions & 3 deletions migrations/IdentityServerDb/Migrations/PersistedGrantDb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CREATE TABLE [PersistedGrants] (
GO

CREATE TABLE [PushedAuthorizationRequests] (
[Id] int NOT NULL IDENTITY,
[Id] bigint NOT NULL IDENTITY,
[ReferenceValueHash] nvarchar(64) NOT NULL,
[ExpiresAtUtc] datetime2 NOT NULL,
[Parameters] nvarchar(max) NOT NULL,
Expand All @@ -64,7 +64,7 @@ CREATE TABLE [PushedAuthorizationRequests] (
GO

CREATE TABLE [ServerSideSessions] (
[Id] int NOT NULL IDENTITY,
[Id] bigint NOT NULL IDENTITY,
[Key] nvarchar(100) NOT NULL,
[Scheme] nvarchar(100) NOT NULL,
[SubjectId] nvarchar(100) NOT NULL,
Expand Down Expand Up @@ -121,7 +121,7 @@ CREATE INDEX [IX_ServerSideSessions_SubjectId] ON [ServerSideSessions] ([Subject
GO

INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
VALUES (N'20231006192628_Grants', N'8.0.0-preview.7.23375.4');
VALUES (N'20231110071347_Grants', N'8.0.0-rc.2.23480.1');
GO

COMMIT;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
name: "PushedAuthorizationRequests",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ReferenceValueHash = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExpiresAtUtc = table.Column<DateTime>(type: "datetime2", nullable: false),
Expand All @@ -89,7 +89,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
name: "ServerSideSessions",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Key = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Scheme = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.0-preview.7.23375.4")
.HasAnnotation("ProductVersion", "8.0.0-rc.2.23480.1")
.HasAnnotation("Relational:MaxIdentifierLength", 128);

SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
Expand Down Expand Up @@ -175,11 +175,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)

modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PushedAuthorizationRequest", b =>
{
b.Property<int>("Id")
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
.HasColumnType("bigint");

SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));

b.Property<DateTime>("ExpiresAtUtc")
.HasColumnType("datetime2");
Expand All @@ -203,11 +203,11 @@ protected override void BuildModel(ModelBuilder modelBuilder)

modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.ServerSideSession", b =>
{
b.Property<int>("Id")
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
.HasColumnType("bigint");

SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));

b.Property<DateTime>("Created")
.HasColumnType("datetime2");
Expand Down
2 changes: 1 addition & 1 deletion src/EntityFramework.Storage/Entities/ServerSideSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Duende.IdentityServer.EntityFramework.Entities;

public class ServerSideSession
{
public int Id { get; set; }
public long Id { get; set; }
public string Key { get; set; }
public string Scheme { get; set; }
public string SubjectId { get; set; }
Expand Down