Changes between Initial Version and Version 8 of Ticket #23794
- Timestamp:
- Sep 11, 2015, 11:45:41 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23794
- Property Triage Stage Unreviewed → Accepted
- Property Type Uncategorized → Bug
- Property Version 1.7 → master
- Property Owner changed from to
- Property Status new → closed
- Property Resolution → fixed
- Property Has patch set
- Property Cc added
-
Ticket #23794 – Description
initial v8 1 1 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. 2 3 NOTE: After upgrading, you must remove the bad migration file and re-run `makemigrations` or manually move the `AlterUniqueTogether` operation manually as stated above; i.e. upgrading does not fix the existing migration.