Changes between Initial Version and Version 8 of Ticket #23794


Ignore:
Timestamp:
Sep 11, 2015, 11:45:41 AM (9 years ago)
Author:
berto
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23794

    • Property Triage Stage UnreviewedAccepted
    • Property Type UncategorizedBug
    • Property Version 1.7master
    • Property Owner changed from nobody to Andrzej Pragacz
    • Property Status newclosed
    • Property Resolutionfixed
    • Property Has patch set
    • Property Cc info+coding@… added
  • Ticket #23794 – Description

    initial v8  
    11I 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
     3NOTE: 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.
Back to Top