Opened 3 weeks ago

Last modified 3 weeks ago

#35717 assigned Cleanup/optimization

Reduce CreateCollation + RemoveCollation to nothing

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

Description

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.

Change History (1)

comment:1 by Sarah Boyce, 3 weeks ago

Has patch: set
Triage Stage: UnreviewedAccepted

Thank you! PR

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