Answer the question
In order to leave comments, you need to log in
How to rollback makemigrations in django?
Added a field to the model:
slug = models.SlugField(u'url', max_length=255, blank=True, null=True, unique=True)
django.db.utils.IntegrityError: (1062, "Duplicate entry '' for key 'slug'")
Answer the question
In order to leave comments, you need to log in
Just delete this migration file if it hasn't already been applied. Correct and run makemigrations again.
Manage.py show migrations shows applied and unapplied migrations.
By specifying a number, you can rollback to a previous migration
manage.py migrate <model> <migration number>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question