#31255: Migrations create a redundant RemoveField operation when deleting 2
models
with related fields.
-------------------------------------+-------------------------------------
Reporter: Panagis | Owner: Simon
Alisandratos | Charette
Type: | Status: assigned
Cleanup/optimization |
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: migration,optimizer | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* owner: (none) => Simon Charette
* status: new => assigned
* has_patch: 0 => 1
Comment:
Submitted a draft PR.
I'd like to try a shot at an alternative patch that changes
`Operation.reduce` signature to `(operation: Operation, app_label: str,
state: ProjectState)` to allow the optimization to be enabled even for
legacy projects with migrations that haven't tracked removed field and
models over time. It would also avoid a ''public'' API change for
`RemoveField` and `DeleteModel`.
--
Ticket URL: <https://code.djangoproject.com/ticket/31255#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.61ac217ebe5e4daa5e61d8f5c15ad630%40djangoproject.com.