dotnet / EntityFramework.Docs

Documentation for Entity Framework Core and Entity Framework 6
https://docs.microsoft.com/ef/
Creative Commons Attribution 4.0 International
1.63k stars 1.96k forks source link

Migration order matters #3444

Open tibold opened 3 years ago

tibold commented 3 years ago

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.

ajcvickers commented 3 years ago

Note from triage: it would be good to better document this.