Document recording the latest migration id in the model snapshot#5270
Document recording the latest migration id in the model snapshot#5270roji wants to merge 1 commit intodotnet:preview-3from
Conversation
| migration before sharing it. | ||
| When working with Migrations in team environments, problems can arise when when migrations are added by multiple developers around the same time; recall that migrations aren't simply SQL scripts, but also include a snapshot of the model at the time of that migration. Possible issues include: | ||
|
|
||
| ## Merging |
There was a problem hiding this comment.
@AndriySvyryd I removed this previous section of the docs, maintaining a harsher stance towards merging; following the previous instructions, you would indeed have a correct latest model snapshot (assuming the two conflicting migrations didn't change the exact same area of the model); however, the new migration would still have an incorrect model snapshot (without the changes from the previously-merged one), so IIUC if a user later rolled back to it and generated a new migration, things would get corrupt.
Let me know if this all makes sense to you... I think the new, simpler guidance is healthier - do not attempt to merge, but rather always roll back and recreate. We make this much simpler to detect in 11 with the new migration ID feature.
See dotnet/efcore#37688