Changes between Initial Version and Version 1 of Ticket #32263
- Timestamp:
- Dec 12, 2020, 1:34:25 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32263 – Description
initial v1 49 49 There are two apparent problems with the result: 50 50 * 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) 52 52 53 53 I 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)