Closed Mitch528 closed 1 year ago
In general, our advice if you are upgrading multiple versions is to do each version as a separate migration. Applying 6.0 -> 6.1 and then 6.1 -> 6.2 incrementally should work without issues. Your workaround also looks fine to me.
Sorry, didn't mean to close this immediately. Follow up discussion is always fine, and please let us know if you need anything else here!
Which version of Duende IdentityServer are you using?
6.2.3
Which version of .NET are you using?
.NET 7
Describe the bug
Adding an EF Core MySQL migration for
PersistedGrantDbContext
when upgrading from 6.0.4 to 6.2.3 results in an error when updating the database.I'm not sure if there is a fix that can be done on
Duende.IdentityServer
or if this issue belongs in the Pomelo.EntityFrameworkCore.MySql repo.To Reproduce
dotnet ef migrations add Update_DuendeIdentityServer_v6_2 -c PersistedGrantDbContext -o Data/Migrations/IdentityServer/PersistedGrantDb
dotnet ef database update -c PersistedGrantDbContext
Expected behavior
I expected the migration to update the database successfully.
Log output/exception with stacktrace
Additional context
EF Core Migration:
The issue occurs at:
A workaround is to comment out that line and replace it with:
Additional Packages: MySqlConnector - 2.2.5 Pomelo.EntityFrameworkCore.MySql - 7.0.0