🐛 Fix poll status not set to finalized for paused polls

This commit is contained in:
Luke Vella 2023-12-05 15:12:17 +07:00
parent a80460814e
commit 1bd4723237

View file

@ -0,0 +1,8 @@
/*
Fixes an issue in the previous migration where paused polls were not being
set to finalized if they had an event_id.
*/
-- Set "status" to "finalized" if "event_id" is not null
UPDATE "polls"
SET "status" = 'finalized'::poll_status
WHERE "event_id" IS NOT NULL;