]> Untitled Git - lemmy.git/blob - migrations/2023-07-19-163511_comment_sort_hot_rank_then_score/up.sql
Revert "Attempt to fix CI building wrong commits (#3830)"
[lemmy.git] / migrations / 2023-07-19-163511_comment_sort_hot_rank_then_score / up.sql
1 -- Alter the comment_aggregates hot sort to sort by score after hot_rank.
2 -- Reason being, is that hot_ranks go to zero after a few days,
3 -- and then comments should be sorted by score, not published.
4 DROP INDEX idx_comment_aggregates_hot, idx_comment_aggregates_score;
5
6 CREATE INDEX idx_comment_aggregates_hot ON comment_aggregates (hot_rank DESC, score DESC);
7
8 -- Remove published from this sort, its pointless
9 CREATE INDEX idx_comment_aggregates_score ON comment_aggregates (score DESC);
10