#23794: FieldDoesNotExist error in migration with deleted fields and unique_together constraint -------------------------+------------------------------------------------- Reporter: | Owner: nobody heybuddy | Status: new Type: | Version: 1.7 Uncategorized | Keywords: migration unique_together Component: | removefield Migrations | Has patch: 0 Severity: Normal | UI/UX: 0 Triage Stage: | Unreviewed | Easy pickings: 0 | -------------------------+------------------------------------------------- I had a model that had a ForeignKey field and a unique_together constraint involving that field. I deleted both the field and the unique_together constraint in my model and ran makemigrations. The migration created RemoveField operation and a AlterUniqueTogether operation with unique_together=set([]). When I tried to run the migration, a django.db.models.fields.FieldDoesNotExist exception occured. I edited the migration manually to put the AlterUniqueTogether operation before the RemoveField operation and then the migration worked.
-- Ticket URL: <https://code.djangoproject.com/ticket/23794> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.26bd0d6f5ae112c29071900745ff6248%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.