discourse/plugins
Natalie Tay fcaefc9f2f
FIX: De-duplicate poll vote on user merge (#22107)
When merging users, polls may error out if the source and target users have both voted on the same poll before. 😢 

There is no constraint on the `poll_votes` table either to support this. Ideally a composite primary key can be used `(poll_id, user_id)`, but alas there is no support yet, which is probably why it wasn't created in the first place.

This fix ensures that merging is successful by only keeping the target poll votes if duplicates exist.

This fix also runs a migration on older poll votes where failed merges would have caused a single user to have voted twice on a single poll. e.g. this weird edge case
2023-06-15 11:18:51 +08:00
..
chat FEATURE: Thread indicator improvements and participants (#21909) 2023-06-15 10:49:27 +10:00
discourse-details Update translations (#21583) 2023-05-16 19:40:01 +02:00
discourse-lazy-videos DEV: Fix random typos (#21638) 2023-05-18 15:34:46 +02:00
discourse-local-dates DEV: Remove superfluous js: true metadata (#21960) 2023-06-07 09:26:58 +08:00
discourse-narrative-bot Update translations (#22081) 2023-06-13 15:18:44 +02:00
discourse-presence Update translations (#20370) 2023-02-20 11:01:01 +01:00
poll FIX: De-duplicate poll vote on user merge (#22107) 2023-06-15 11:18:51 +08:00
styleguide DEV: implements styleguide for chat header icon (#22033) 2023-06-09 18:40:34 +02:00