Change defaults on user vote display mode to upvotes + downvotes (#4599)

* Change defaults on user vote display mode to upvotes + downvotes

* Forgot to regenerate the rows.

* Drop and re-add columns instead.
This commit is contained in:
Dessalines 2024-04-10 04:47:05 -04:00 committed by GitHub
parent b4670988b5
commit 99d585b7be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,10 @@
ALTER TABLE local_user_vote_display_mode
DROP COLUMN score,
ADD COLUMN score boolean DEFAULT TRUE NOT NULL,
DROP COLUMN upvotes,
ADD COLUMN upvotes boolean DEFAULT FALSE NOT NULL,
DROP COLUMN downvotes,
ADD COLUMN downvotes boolean DEFAULT FALSE NOT NULL,
DROP COLUMN upvote_percentage,
ADD COLUMN upvote_percentage boolean DEFAULT TRUE NOT NULL;

View File

@ -0,0 +1,14 @@
-- 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
DROP COLUMN score,
ADD COLUMN score boolean DEFAULT FALSE NOT NULL,
DROP COLUMN upvotes,
ADD COLUMN upvotes boolean DEFAULT TRUE NOT NULL,
DROP COLUMN downvotes,
ADD COLUMN downvotes boolean DEFAULT TRUE NOT NULL,
DROP COLUMN upvote_percentage,
ADD COLUMN upvote_percentage boolean DEFAULT FALSE NOT NULL;