You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/upgrades/identityserver4-to-duende-identityserver-v7.mdx
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,10 @@ Depending on the package version shown, your next steps will be different:
49
49
50
50
The most straightforward upgrade path is to first update to the latest version of IdentityServer4 v4, and then continue to the latest Duende IdentityServer.
51
51
52
+
:::tip[Sample project]
53
+
We have a [sample project available on GitHub](https://github.com/DuendeSoftware/UpgradeSample-IdentityServer4-v3), which contains database migration scripts for these changes.
54
+
:::
55
+
52
56
Between IdentityServer4 v3.x and v4.x, the configuration object model was updated:
53
57
54
58
- The relation between `ApiResources` and `ApiScopes` was changed from parent-child to many-to-many.
@@ -61,10 +65,8 @@ Between IdentityServer4 v3.x and v4.x, the configuration object model was update
61
65
62
66
IdentityServer4 projects that use the `IdentityServer4.EntityFramework` package or implement their own stores will need to update their code and/or database to reflect these changes.
63
67
68
+
:::caution
64
69
Database changes will need to be done using a custom migration script, as using the default Entity Framework Core migration will result in data loss. We'll look at this later in this upgrade guide.
65
-
66
-
:::tip[Sample project]
67
-
We have a [sample project available on GitHub](https://github.com/DuendeSoftware/UpgradeSample-IdentityServer4-v3), which contains database migration scripts for these changes.
68
70
:::
69
71
70
72
### Step 1: Update NuGet Packages
@@ -81,7 +83,7 @@ Make sure to change the version number for all IdentityServer4 packages, includi
81
83
### Step 2: Make Code Changes
82
84
83
85
It's likely some code changes will be required, especially when using the IdentityServer UI templates.
84
-
Visual Studio and JetBrains Rider provide great code completion that can be of help here.
86
+
[Visual Studio](https://visualstudio.microsoft.com/) and [JetBrains Rider](https://www.jetbrains.com/rider/) provide great code completion that can be of help here.
85
87
86
88
:::tip[Use the new Razor Pages templates]
87
89
If you have not made customizations to the IdentityServer UI templates, consider replacing them with the new Razor Pages-based templates as shown in [the quickstart tutorials](../../quickstarts/0-overview).
@@ -248,6 +250,7 @@ We'll start with creating a migration that targets the `ConfigurationDbContext`
248
250
</Steps>
249
251
250
252
Your database schema should now be updated. You can verify all data is intact, using the [queries outlined in `query_v4.sql`](https://github.com/DuendeArchive/UpgradeSample-IdentityServer4-v3/blob/main/IdentityServerMigrationSample/query_v4.sql).
253
+
These queries may return a lot of data, consider adding a `TOP` clause if you want to only sample some of the migrated data.
251
254
252
255
<details>
253
256
<summary>View SQL queries to validate migration succeeded</summary>
0 commit comments