mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-09-27 05:50:03 +00:00
be1389420b
* SQL format checking, 1. * SQL format checking, 2. * SQL format checking, 3. * SQL format checking, 4. * SQL format checking, 5. * Running pg_format * Getting rid of comment. * Upping pg_format version. * Using git ls-files for sql format check. * Fixing sql lints. * Addressing PR comments.
10 lines
492 B
SQL
10 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);
|
|
|