diff --git a/migrations/2024-04-23-020604_add_post_id_index/down.sql b/migrations/2024-04-23-020604_add_post_id_index/down.sql index 4398c106c..fb4c92f6c 100644 --- a/migrations/2024-04-23-020604_add_post_id_index/down.sql +++ b/migrations/2024-04-23-020604_add_post_id_index/down.sql @@ -58,12 +58,6 @@ DROP INDEX idx_post_aggregates_featured_local_scaled; DROP INDEX idx_post_aggregates_featured_local_score; -DROP INDEX idx_post_aggregates_nonzero_hotrank; - -DROP INDEX idx_post_aggregates_published; - -DROP INDEX idx_post_aggregates_published_asc; - CREATE INDEX idx_post_aggregates_community_active ON public.post_aggregates USING btree (community_id, featured_local DESC, hot_rank_active DESC, published DESC); CREATE INDEX idx_post_aggregates_community_controversy ON public.post_aggregates USING btree (community_id, featured_local DESC, controversy_rank DESC); @@ -124,10 +118,3 @@ CREATE INDEX idx_post_aggregates_featured_local_scaled ON public.post_aggregates CREATE INDEX idx_post_aggregates_featured_local_score ON public.post_aggregates USING btree (featured_local DESC, score DESC, published DESC); -CREATE INDEX idx_post_aggregates_nonzero_hotrank ON public.post_aggregates USING btree (published DESC) -WHERE ((hot_rank <> (0)::double precision) OR (hot_rank_active <> (0)::double precision)); - -CREATE INDEX idx_post_aggregates_published ON public.post_aggregates USING btree (published DESC); - -CREATE INDEX idx_post_aggregates_published_asc ON public.post_aggregates USING btree (public.reverse_timestamp_sort (published) DESC); - diff --git a/migrations/2024-04-23-020604_add_post_id_index/up.sql b/migrations/2024-04-23-020604_add_post_id_index/up.sql index c2131fe2b..8581d7169 100644 --- a/migrations/2024-04-23-020604_add_post_id_index/up.sql +++ b/migrations/2024-04-23-020604_add_post_id_index/up.sql @@ -59,12 +59,6 @@ DROP INDEX idx_post_aggregates_featured_local_scaled; DROP INDEX idx_post_aggregates_featured_local_score; -DROP INDEX idx_post_aggregates_nonzero_hotrank; - -DROP INDEX idx_post_aggregates_published; - -DROP INDEX idx_post_aggregates_published_asc; - CREATE INDEX idx_post_aggregates_community_active ON public.post_aggregates USING btree (community_id, featured_local DESC, hot_rank_active DESC, published DESC, post_id DESC); CREATE INDEX idx_post_aggregates_community_controversy ON public.post_aggregates USING btree (community_id, featured_local DESC, controversy_rank DESC, post_id DESC); @@ -125,10 +119,3 @@ CREATE INDEX idx_post_aggregates_featured_local_scaled ON public.post_aggregates CREATE INDEX idx_post_aggregates_featured_local_score ON public.post_aggregates USING btree (featured_local DESC, score DESC, published DESC, post_id DESC); -CREATE INDEX idx_post_aggregates_nonzero_hotrank ON public.post_aggregates USING btree (published DESC) -WHERE ((hot_rank <> (0)::double precision) OR (hot_rank_active <> (0)::double precision)); - -CREATE INDEX idx_post_aggregates_published ON public.post_aggregates USING btree (published DESC); - -CREATE INDEX idx_post_aggregates_published_asc ON public.post_aggregates USING btree (public.reverse_timestamp_sort (published) DESC); -