mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-05 12:05:01 +00:00
15f02f00a9
* Add a vote_display_mode local_user setting. - Fixes #4449 * Changing HideDownvotes to Score. * Adding ScoreAndDownvote display mode. * Adding upvote and downvote mode. * Extracting vote_display_mode to another table. * Fixing fmt. * Remove published and updated columns. --------- Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
18 lines
606 B
SQL
18 lines
606 B
SQL
-- Create an extra table to hold local user vote display settings
|
|
-- Score and Upvote percentage are turned on by default.
|
|
CREATE TABLE local_user_vote_display_mode (
|
|
local_user_id int REFERENCES local_user ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
|
|
score boolean DEFAULT TRUE NOT NULL,
|
|
upvotes boolean DEFAULT FALSE NOT NULL,
|
|
downvotes boolean DEFAULT FALSE NOT NULL,
|
|
upvote_percentage boolean DEFAULT TRUE NOT NULL,
|
|
PRIMARY KEY (local_user_id)
|
|
);
|
|
|
|
-- Insert rows for every local user
|
|
INSERT INTO local_user_vote_display_mode (local_user_id)
|
|
SELECT
|
|
id
|
|
FROM
|
|
local_user;
|
|
|