You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/migrations/2023-07-19-163511_comment_s.../up.sql

11 lines
492 B
SQL

-- Alter the comment_aggregates hot sort to sort by score after hot_rank.
-- Reason being, is that hot_ranks go to zero after a few days,
-- and then comments should be sorted by score, not published.
DROP INDEX idx_comment_aggregates_hot, idx_comment_aggregates_score;
CREATE INDEX idx_comment_aggregates_hot ON comment_aggregates (hot_rank DESC, score DESC);
-- Remove published from this sort, its pointless
CREATE INDEX idx_comment_aggregates_score ON comment_aggregates (score DESC);