Opened 3 months ago

Closed 5 weeks ago

#35717 closed Cleanup/optimization (fixed)

Reduce CreateCollation + RemoveCollation to nothing

Reported by: Adam Johnson Owned by: Adam Johnson
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
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 (3)

comment:1 by Sarah Boyce, 3 months ago

Has patch: set
Triage Stage: UnreviewedAccepted

Thank you! PR

comment:2 by Mariusz Felisiak, 5 weeks ago

Triage Stage: AcceptedReady for checkin

comment:3 by Sarah Boyce <42296566+sarahboyce@…>, 5 weeks ago

Resolution: fixed
Status: assignedclosed

In cee95e61:

Fixed #35717 -- Reduced Create/RemoveCollation operations when optimizing migrations.

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