Changes between Initial Version and Version 1 of Ticket #32263


Ignore:
Timestamp:
Dec 12, 2020, 1:34:25 AM (4 years ago)
Author:
InvalidInterrupt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32263 – Description

    initial v1  
    4949There are two apparent problems with the result:
    5050* The model with the `ForeignKey` field is created before the target of the `ForeignKey`
    51 * The `to` parameter of the `ForeignKey` is not updated with the new model name
     51* The `to` parameter of the `ForeignKey` is not updated with the new model name (the final `AddField` operation is not necessary to cause this problem)
    5252
    5353I believe this is caused by `CreateModel.reduce()` allowing optimization though operations that reference models which the model being created has a relationship to. Similar effects are likely to be caused by other migration patterns as well (I think Tim Graham may have found one [https://code.djangoproject.com/ticket/24849#comment:1 here] but as far as I can tell that's not the problem originally reported in that ticket)
Back to Top