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
The documentation fails to mention that the migration order matters.
Each migration will store the snapshot which is then used by the dotnet-ef when a migration needs to be removed.
This can easily cause a situation where the last migration (both applied and file name order) will not be the more up to date snapshot. And the following process will end up using the wrong snapshot for generating migrations:
add migration <- creates new migration (works with no changes as well)
remove migration <- reverts said migrations and model snapshot
add migration <- this step will use the wrong snapshot and generate incorrect migrations
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 0fbabb60-978b-99b3-0376-b2af83765680
Version Independent ID: fcfb2618-1415-4173-5210-ddf06ec9342e
Activity
[-]Migration order matter[/-][+]Migration order matters[/+]ajcvickers commentedon Sep 28, 2021
Note from triage: it would be good to better document this.
Expand and clarify migrations guidance. (dotnet#5445)