From 1f284076ce7e1141358c40966d6b8f23322fa56d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 2 Dec 2024 18:35:18 -0500 Subject: [PATCH] Adding a few indexes. --- crates/db_schema/src/schema.rs | 1 - migrations/2024-12-02-181601_add_combined_tables/up.sql | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/db_schema/src/schema.rs b/crates/db_schema/src/schema.rs index 925401c95..c93dabf48 100644 --- a/crates/db_schema/src/schema.rs +++ b/crates/db_schema/src/schema.rs @@ -660,7 +660,6 @@ diesel::table! { enabled -> Bool, published -> Timestamptz, updated -> Nullable, - use_pkce -> Bool, } } diff --git a/migrations/2024-12-02-181601_add_combined_tables/up.sql b/migrations/2024-12-02-181601_add_combined_tables/up.sql index 236d7ab14..0b93d26e4 100644 --- a/migrations/2024-12-02-181601_add_combined_tables/up.sql +++ b/migrations/2024-12-02-181601_add_combined_tables/up.sql @@ -22,6 +22,12 @@ CREATE INDEX idx_report_combined_published ON report_combined (published DESC, i CREATE INDEX idx_report_combined_published_asc ON report_combined (reverse_timestamp_sort (published) DESC, id DESC); +CREATE INDEX idx_report_combined_post_report ON report_combined (post_report_id); + +CREATE INDEX idx_report_combined_comment_report ON report_combined (comment_report_id); + +CREATE INDEX idx_report_combined_private_message_report ON report_combined (private_message_report_id); + -- Updating the history INSERT INTO report_combined (published, post_report_id) SELECT