Is this a wagtail migration issue or did I do something wrong?

93 views
Skip to first unread message

Doug Donaldson

unread,
Aug 25, 2016, 3:09:13 PM8/25/16
to Wagtail support
I had a wagtail install that was initially these versions:
wagtail 1.5.3
django 1.8.14
django-taggit 0.14

I upgraded the install to be:
wagtail 1.6 
django 1.10

and ran migrate which ran fine.

Then as part of getting the site running again I upgraded django-taggit to 0.18.0 per django 1.10's install_requires. This taggit version jump included a new migration. The currently installed wagtaildocs and wagtailimage both have a migration dependency on taggit '__latest__' and these migrations have already run. But since I upgraded taggit, it now has a new migration and this means that migration operations all throw a django.db.migrations.exceptions.InconsistentMigrationHistory since both wagtaildocs and wagtailimage both think they have applied migrations before a dependent migration has been applied (taggit __latest__).

I have run over this quite a bit in my head and can't see what I did wrong. How do you handle an app already having applied migrations that are dependent on another apps.__latest__ and that other app starts showing up with new migrations? Is the use of __latest__ in the wagtaildocs and wagtailimage apps incorrect and is this an issue?

Doug


Matthew Westcott

unread,
Sep 6, 2016, 7:06:52 AM9/6/16
to wag...@googlegroups.com
Hi Doug,
Wagtail has had a dependency on django-taggit 0.18 since Wagtail 1.4, so your original install shouldn't really have been using such an old version of taggit - but yep, I think you're right, we shouldn't be depending on taggit __latest__.

It looks like the InconsistentMigrationHistory is something that Django has started enforcing in Django 1.10. We also specify a dependency on ('wagtailcore', '__latest__') in our project template, so presumably that's going to bite us the next time we add a migration to wagtailcore. I'll add a fix for this - thanks for the report!

Cheers,
- Matt
Reply all
Reply to author
Forward
0 new messages