diff --git a/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/down.sql b/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/down.sql new file mode 100644 index 000000000..9436a019d --- /dev/null +++ b/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/down.sql @@ -0,0 +1,6 @@ +ALTER TABLE local_user_vote_display_mode + ALTER COLUMN upvotes SET DEFAULT FALSE, + ALTER COLUMN downvotes SET DEFAULT FALSE, + ALTER COLUMN score SET DEFAULT TRUE, + ALTER COLUMN upvote_percentage SET DEFAULT TRUE; + 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 new file mode 100644 index 000000000..b270bacbb --- /dev/null +++ b/migrations/2024-04-05-153647_alter_vote_display_mode_defaults/up.sql @@ -0,0 +1,10 @@ +-- Based on a poll, update the local_user_vote_display_mode defaults to: +-- Upvotes + Downvotes +-- Rather than +-- Score + upvote_percentage +ALTER TABLE local_user_vote_display_mode + ALTER COLUMN upvotes SET DEFAULT TRUE, + ALTER COLUMN downvotes SET DEFAULT TRUE, + ALTER COLUMN score SET DEFAULT FALSE, + ALTER COLUMN upvote_percentage SET DEFAULT FALSE; +