by yxhuvud · 4y ago · 0 comments
I much prefer the timestamp based system that is used by Rails, it make the risk of that kind of conflict a lot lower.
The migration file will contain explicit dependency information, something like:
dependencies = [
('app', '0010_alter_menuitem_absolute_url')
]
The migration engine will order the dependencies at runtime, and it will bail (and suggest creating a "merge" migration) if you have diverging trees of migrations. I find it pretty robust in practice.We have this happen at work, when merging branches; this is what `./manage.py makemigrations --merge` exists for.