#35717: Reduce CreateCollation + RemoveCollation to nothing
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: Adam Johnson
Johnson |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: dev
Migrations |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
These Postgres-specific operations should optimize into nothing, if they
create and remove the same collation.
I believe we need to implement `CreateCollation.reduce()` that returns an
empty list when the other operation is a `RemoveCollation` for the same
`(locale, provider, deterministic)` tuple. This can take inspiration from
`CreateModel.reduce()` which does similar when reducing to a
`DeleteModel`.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35717>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.