(no title)
cessor | 4 years ago
I found that django's naming scheme for migrations is good enough; here are some real ones that I pulled out of my current project:
migrations/0006_add_modeltranslation.py
migrations/0007_remove_temp_fields.py
migrations/0008_remove_language_field.py
migrations/0009_alter_page_slug.py
migrations/0010_alter_menuitem_absolute_url.py
While they aren't semantically rich ('Why did you change absolute url on menu item?') I found that they are easy to distinguish and navigate.
yxhuvud|4 years ago
I much prefer the timestamp based system that is used by Rails, it make the risk of that kind of conflict a lot lower.
Wilya|4 years ago
The migration file will contain explicit dependency information, something like:
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.tzot|4 years ago
We have this happen at work, when merging branches; this is what `./manage.py makemigrations --merge` exists for.
Klonoar|4 years ago
That said, it's very annoying in that they're not tab-completable... any time I have to edit one, I have to stop and hunt in the entire list for what I'm looking for.
jmconfuzeus|4 years ago
MattGaiser|4 years ago