]> Untitled Git - lemmy.git/blob - migrations/2023-07-14-215339_aggregates_nonzero_indexes/up.sql
fix submodule error
[lemmy.git] / migrations / 2023-07-14-215339_aggregates_nonzero_indexes / up.sql
1 -- Your SQL goes here
2 CREATE INDEX idx_community_aggregates_nonzero_hotrank ON community_aggregates (published)
3 WHERE
4     hot_rank != 0;
5
6 CREATE INDEX idx_comment_aggregates_nonzero_hotrank ON comment_aggregates (published)
7 WHERE
8     hot_rank != 0;
9
10 CREATE INDEX idx_post_aggregates_nonzero_hotrank ON post_aggregates (published DESC)
11 WHERE
12     hot_rank != 0 OR hot_rank_active != 0;
13