Opened 9 years ago

Closed 3 weeks ago

#27737 closed Cleanup/optimization (wontfix)

Investigate if reloading old relational fields in migration operations' state_forwards is needed

Reported by: Markus Holtermann Owned by:
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Suzannah Cooper Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Markus Holtermann)

As a followup to #27666

The new behavior inside state_forwards() of migration operations is to not reload related models of old relationships in the old state (https://github.com/django/django/pull/7589/files#diff-efb7d00c2383393046c9c5d842f45499R202). This might be just fine, but might cause issues.

Change History (5)

comment:1 by Markus Holtermann, 9 years ago

Description: modified (diff)

comment:2 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 4 years ago

Owner: Markus Holtermann removed
Status: assignednew

comment:4 by Suzannah Cooper, 4 weeks ago

Cc: Suzannah Cooper added

comment:5 by Markus Holtermann, 3 weeks ago

Resolution: wontfix
Status: newclosed

After 9 years, I'm not entirely sure anymore, what I had in mind when I opened this issue 9 years ago. The only reference to this ticket is in the alter_field method of the ProjectState.

Practically, the lack of reloading old models hasn't caused any problems that could be attributed to this code here.

Logically, after the alter_field state operation, the previously new_state becomes an old_state for the next operation. Which means, the former old_state is unused. Thus no reloading is needed.

Note: See TracTickets for help on using tickets.
Back to Top