Reputation: 41
We had a CustomUser model in our application and I am trying to add two new columns to the existing auth.Group table as below.
Group.add_to_class('source', models.CharField(max_length=255, default='XXXXXXX')) Group.add_to_class('tags', TaggableManager(blank=True))
When we try to execute python manage.py makemigrations. Its throwing an error saying inconsistent of migration history.
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration customuser.0001_initial is applied before its dependency auth.0013_group_source_group_tags on database 'default'.
Need suggestion on the same. How do we handle migrations in such situation. We don't want to create new data base and migrate all the data everytime.
Upvotes: 0
Views: 535
Reputation: 670
maybe if you add null=True will work
python manage.py makemigrations but_name_here
python manage.py migrate same_name_here
Upvotes: 1