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
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:
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.