From 260d235027374d8a9679ca2b937de947c46cc605 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 5 Apr 2024 11:50:31 -0400 Subject: [PATCH] Forgot to regenerate the rows. --- .../up.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/up.sql b/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/up.sql index b270bacbb..f98012713 100644 --- a/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/up.sql +++ b/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/up.sql @@ -8,3 +8,13 @@ ALTER TABLE local_user_vote_display_mode ALTER COLUMN score SET DEFAULT FALSE, ALTER COLUMN upvote_percentage SET DEFAULT FALSE; +-- Regenerate the rows with the new default +DELETE FROM local_user_vote_display_mode; + +-- Re-insert them +INSERT INTO local_user_vote_display_mode (local_user_id) +SELECT + id +FROM + local_user; +