CitizenLabDotCo / citizenlab

Go Vocal is a digital democracy platform that facilitates community participation and co-creation. Participants can post ideas, contribute to discussions, or choose to vote and prioritize community projects.
https://www.govocal.com
Other
211 stars 34 forks source link

[TAN-2791] Remove areas_projects duplicates and add uniqueness index #9092

Closed jinjagit closed 8 hours ago

jinjagit commented 3 days ago

Tested locally (on 2 tenants, each with one project with areas_projects that are not duplicated, and one project with duplicate areas_projects). Removes duplicates, and leaves unique records in place.

Changelog

Technical

[TAN-2791] Remove areas_projects duplicates and add uniqueness index

notion-workspace[bot] commented 3 days ago

Fix duplicate areas_projects records

cl-dev-bot commented 3 days ago
Messages
:book: Changelog provided 🎉
:book: Notion issue: TAN-2791
:book: Run the e2e tests
:book: Check translation progress

Generated by :no_entry_sign: dangerJS against 60da41a260bfa7b7cdfe40d66084f5713733748c

jinjagit commented 3 days ago

@jamesspeake

Looks good to me. Just wondering if you've tried anything to try and recreate the situation - maybe it is just clicking the button twice quickly when adding the relationship?

I have no idea how it happened. I can't see how clicking twice quickly is possible, as it's a multi-select that closes as soon as an item is selected (and selected items are then no longer in the list, if the multi-select is opened again).

Have you run a query on metabase to see how many platforms it affects

No, but as described in the ticket, I ran a script to check how many platforms are affected on UK and EU clusters (4 & 32, respectively).