Skip to content

Prevent startup crash on PendingModelChangesWarning in MigrateDatabase - #202

Open
safak-temel-kd wants to merge 1 commit into
kocdigital:masterfrom
safak-temel-kd:fix/migrate-database-pending-model-changes-warning
Open

Prevent startup crash on PendingModelChangesWarning in MigrateDatabase#202
safak-temel-kd wants to merge 1 commit into
kocdigital:masterfrom
safak-temel-kd:fix/migrate-database-pending-model-changes-warning

Conversation

@safak-temel-kd

Copy link
Copy Markdown

EF Core 8+ throws an InvalidOperationException when the runtime model no longer matches the last migration snapshot. This crashed app startup after upgrading to net10.0/EF Core 10. Catch specifically that exception and log a warning instead, letting the app continue while devs add the missing migration.

EF Core 8+ throws an InvalidOperationException when the runtime model
no longer matches the last migration snapshot. This crashed app startup
after upgrading to net10.0/EF Core 10. Catch specifically that exception
and log a warning instead, letting the app continue while devs add the
missing migration.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant