urga / djangocms-slider

A simple django cms slideshow plugin
GNU General Public License v2.0
10 stars 16 forks source link

InconsistentMigrationHistory when upgrading due to dependency of latest Django CMS migration #9

Open MacLake opened 6 years ago

MacLake commented 6 years ago

The dependency

    dependencies = [
        ('cms', '__latest__'),
    ]

in migrations/0001_initial.py leads to an InconsistentMigrationHistory when updating Django CMS with new migrations, because in case the initial djangocms-slider migration has already been executed and after that new migrations in Django CMS are added, which are then not yet executed yet, Django complains, because of that:

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration djangocms_slider.0001_initial is applied before its dependency cms.0020_old_tree_cleanup on database 'default'.

When you remove this dependency, the migration works fine.