Skip to content

Commit 71fcf97

Browse files
committed
Update migrations
1 parent 4af283a commit 71fcf97

File tree

8 files changed

+216
-10
lines changed

8 files changed

+216
-10
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/ApplicationDbContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
22
using Microsoft.EntityFrameworkCore;
33
using Microsoft.Extensions.Options;
4-
using IdentityServer4.EntityFramework.Options;
4+
using Duende.IdentityServer.EntityFramework.Options;
55
using ComponentsWebAssembly_CSharp.Server.Models;
66

77
namespace ComponentsWebAssembly_CSharp.Server.Data;

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs

Lines changed: 40 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,24 @@ protected override void Up(MigrationBuilder migrationBuilder)
6565
table.PrimaryKey("PK_DeviceCodes", x => x.UserCode);
6666
});
6767

68+
migrationBuilder.CreateTable(
69+
name: "Keys",
70+
columns: table => new
71+
{
72+
Id = table.Column<string>(type: "TEXT", nullable: false),
73+
Version = table.Column<int>(type: "INTEGER", nullable: false),
74+
Created = table.Column<DateTime>(type: "TEXT", nullable: false),
75+
Use = table.Column<string>(type: "TEXT", maxLength: 450, nullable: true),
76+
Algorithm = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
77+
IsX509Certificate = table.Column<bool>(type: "BIT", nullable: false),
78+
DataProtected = table.Column<bool>(type: "BIT", nullable: false),
79+
Data = table.Column<string>(type: "TEXT", maxLength: 50000, nullable: false)
80+
},
81+
constraints: table =>
82+
{
83+
table.PrimaryKey("PK_Keys", x => x.Id);
84+
});
85+
6886
migrationBuilder.CreateTable(
6987
name: "PersistedGrants",
7088
columns: table => new
@@ -239,6 +257,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
239257
table: "DeviceCodes",
240258
column: "Expiration");
241259

260+
migrationBuilder.CreateIndex(
261+
name: "IX_Keys_Use",
262+
table: "Keys",
263+
column: "Use");
264+
242265
migrationBuilder.CreateIndex(
243266
name: "IX_PersistedGrants_Expiration",
244267
table: "PersistedGrants",
@@ -275,6 +298,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
275298
migrationBuilder.DropTable(
276299
name: "DeviceCodes");
277300

301+
migrationBuilder.DropTable(
302+
name: "Keys");
303+
278304
migrationBuilder.DropTable(
279305
name: "PersistedGrants");
280306

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
8080
b.ToTable("AspNetUsers");
8181
});
8282

83-
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
83+
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
8484
{
8585
b.Property<string>("UserCode")
8686
.HasMaxLength(200)
@@ -130,7 +130,45 @@ protected override void BuildModel(ModelBuilder modelBuilder)
130130
b.ToTable("DeviceCodes");
131131
});
132132

133-
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
133+
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
134+
{
135+
b.Property<string>("Id")
136+
.HasColumnType("TEXT");
137+
138+
b.Property<string>("Algorithm")
139+
.IsRequired()
140+
.HasMaxLength(100)
141+
.HasColumnType("TEXT");
142+
143+
b.Property<DateTime>("Created")
144+
.HasColumnType("TEXT");
145+
146+
b.Property<string>("Data")
147+
.IsRequired()
148+
.HasMaxLength(50000)
149+
.HasColumnType("TEXT");
150+
151+
b.Property<bool>("DataProtected")
152+
.HasColumnType("bit");
153+
154+
b.Property<bool>("IsX509Certificate")
155+
.HasColumnType("bit");
156+
157+
b.Property<string>("Use")
158+
.HasMaxLength(450)
159+
.HasColumnType("TEXT");
160+
161+
b.Property<int>("Version")
162+
.HasColumnType("int");
163+
164+
b.HasKey("Id");
165+
166+
b.HasIndex("Use");
167+
168+
b.ToTable("Keys");
169+
});
170+
171+
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
134172
{
135173
b.Property<string>("Key")
136174
.HasMaxLength(200)

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs

Lines changed: 41 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,24 @@ protected override void Up(MigrationBuilder migrationBuilder)
6565
table.PrimaryKey("PK_DeviceCodes", x => x.UserCode);
6666
});
6767

68+
migrationBuilder.CreateTable(
69+
name: "Keys",
70+
columns: table => new
71+
{
72+
Id = table.Column<string>(type: "nvarchar(450)", nullable: false),
73+
Version = table.Column<int>(type: "int", nullable: false),
74+
Created = table.Column<DateTime>(type: "datetime2", nullable: false),
75+
Use = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
76+
Algorithm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
77+
IsX509Certificate = table.Column<bool>(type: "bit", nullable: false),
78+
DataProtected = table.Column<bool>(type: "bit", nullable: false),
79+
Data = table.Column<string>(type: "nvarchar(max)", maxLength: 50000, nullable: false)
80+
},
81+
constraints: table =>
82+
{
83+
table.PrimaryKey("PK_Keys", x => x.Id);
84+
});
85+
6886
migrationBuilder.CreateTable(
6987
name: "PersistedGrants",
7088
columns: table => new
@@ -241,6 +259,11 @@ protected override void Up(MigrationBuilder migrationBuilder)
241259
table: "DeviceCodes",
242260
column: "Expiration");
243261

262+
migrationBuilder.CreateIndex(
263+
name: "IX_Keys_Use",
264+
table: "Keys",
265+
column: "Use");
266+
244267
migrationBuilder.CreateIndex(
245268
name: "IX_PersistedGrants_Expiration",
246269
table: "PersistedGrants",
@@ -277,6 +300,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
277300
migrationBuilder.DropTable(
278301
name: "DeviceCodes");
279302

303+
migrationBuilder.DropTable(
304+
name: "Keys");
305+
280306
migrationBuilder.DropTable(
281307
name: "PersistedGrants");
282308

src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
8484
b.ToTable("AspNetUsers");
8585
});
8686

87-
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
87+
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
8888
{
8989
b.Property<string>("UserCode")
9090
.HasMaxLength(200)
@@ -134,7 +134,46 @@ protected override void BuildModel(ModelBuilder modelBuilder)
134134
b.ToTable("DeviceCodes");
135135
});
136136

137-
modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
137+
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
138+
{
139+
b.Property<string>("Id")
140+
.HasMaxLength(450)
141+
.HasColumnType("nvarchar(450)");
142+
143+
b.Property<string>("Algorithm")
144+
.IsRequired()
145+
.HasMaxLength(100)
146+
.HasColumnType("nvarchar(100)");
147+
148+
b.Property<DateTime>("Created")
149+
.HasColumnType("datetime2");
150+
151+
b.Property<string>("Data")
152+
.IsRequired()
153+
.HasColumnType("nvarchar(max)")
154+
.HasMaxLength(50000);
155+
156+
b.Property<bool>("DataProtected")
157+
.HasColumnType("bit");
158+
159+
b.Property<bool>("IsX509Certificate")
160+
.HasColumnType("bit");
161+
162+
b.Property<string>("Use")
163+
.HasMaxLength(450)
164+
.HasColumnType("nvarchar(450)");
165+
166+
b.Property<int>("Version")
167+
.HasColumnType("int");
168+
169+
b.HasKey("Id");
170+
171+
b.HasIndex("Use");
172+
173+
b.ToTable("Keys");
174+
});
175+
176+
modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
138177
{
139178
b.Property<string>("Key")
140179
.HasMaxLength(200)

0 commit comments

Comments
 (0)