From 40c89f99ca17961e398d8a58cf81002095722e2c Mon Sep 17 00:00:00 2001 From: Nutomic Date: Mon, 21 Jul 2025 15:02:51 +0000 Subject: [PATCH] Fix foreign key indexes migration (#5875) --- .../down.sql | 2 +- .../2025-07-18-033358_add_missing_foreign_key_indexes/up.sql | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/down.sql b/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/down.sql index 23fba3fcb..d627c7636 100644 --- a/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/down.sql +++ b/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/down.sql @@ -1,2 +1,2 @@ -DROP INDEX idx_registration_application_admin, idx_admin_allow_instance_admin, idx_admin_block_instance_admin, idx_admin_purge_comment_admin, idx_admin_purge_community_admin, idx_admin_purge_person_admin, idx_admin_purge_post_admin, idx_mod_remove_comment_comment, idx_person_comment_mention_comment, idx_person_liked_combined_comment, idx_person_saved_combined_comment, idx_comment_report_creator, idx_community_report_creator, idx_post_report_creator, idx_private_message_creator, idx_private_message_report_creator, idx_admin_purge_post_community, idx_mod_add_community_community, idx_mod_ban_from_community_community, idx_mod_change_community_visibility_community, idx_mod_remove_community_community, idx_mod_transfer_community_community, idx_tag_community, idx_community_actions_follow_approver, idx_admin_allow_instance_instance, idx_admin_block_instance_instance, idx_community_instance, idx_instance_actions_instance, idx_mod_ban_instance, idx_multi_community_instance, idx_person_instance, idx_community_language_language, idx_local_user_language_language, idx_site_language_language, idx_email_verification_user, idx_oauth_account_user, idx_password_reset_request_user, idx_modlog_combined_mod_change_community_visibility_id, idx_mod_add_community_mod, idx_mod_add_mod, idx_mod_ban_from_community_mod, idx_mod_ban_mod, idx_mod_change_community_visibility_mod, idx_mod_feature_post_mod, idx_mod_lock_post_mod, idx_mod_remove_comment_mod, idx_mod_remove_community_mod, idx_mod_remove_post_mod, idx_mod_transfer_community_mod, idx_local_site_multi_comm_follower, idx_search_combined_multi_community, idx_mod_add_community_other_person, idx_mod_add_other_person, idx_mod_ban_from_community_other_person, idx_mod_other_person, idx_mod_transfer_community_other_person, idx_admin_purge_comment_post, idx_mod_feature_post_post, idx_mod_lock_post_post, idx_mod_remove_post_post, idx_person_liked_combined_post, idx_person_post_mention_post, idx_person_saved_combined_post, idx_private_message_recipient, idx_comment_report_resolver, idx_community_report_resolver, idx_post_report_resolver, idx_private_message_report_resolver, idx_local_site_suggested_communities, idx_post_tag_tag, idx_local_image_thumbnail_post; +DROP INDEX idx_registration_application_admin, idx_admin_allow_instance_admin, idx_admin_block_instance_admin, idx_admin_purge_comment_admin, idx_admin_purge_community_admin, idx_admin_purge_person_admin, idx_admin_purge_post_admin, idx_mod_remove_comment_comment, idx_person_liked_combined_comment, idx_person_saved_combined_comment, idx_comment_report_creator, idx_community_report_creator, idx_post_report_creator, idx_private_message_creator, idx_private_message_report_creator, idx_admin_purge_post_community, idx_mod_add_community_community, idx_mod_ban_from_community_community, idx_mod_change_community_visibility_community, idx_mod_remove_community_community, idx_mod_transfer_community_community, idx_tag_community, idx_community_actions_follow_approver, idx_admin_allow_instance_instance, idx_admin_block_instance_instance, idx_community_instance, idx_instance_actions_instance, idx_mod_ban_instance, idx_multi_community_instance, idx_person_instance, idx_community_language_language, idx_local_user_language_language, idx_site_language_language, idx_email_verification_user, idx_oauth_account_user, idx_password_reset_request_user, idx_modlog_combined_mod_change_community_visibility_id, idx_mod_add_community_mod, idx_mod_add_mod, idx_mod_ban_from_community_mod, idx_mod_ban_mod, idx_mod_change_community_visibility_mod, idx_mod_feature_post_mod, idx_mod_lock_post_mod, idx_mod_remove_comment_mod, idx_mod_remove_community_mod, idx_mod_remove_post_mod, idx_mod_transfer_community_mod, idx_local_site_multi_comm_follower, idx_search_combined_multi_community, idx_mod_add_community_other_person, idx_mod_add_other_person, idx_mod_ban_from_community_other_person, idx_mod_other_person, idx_mod_transfer_community_other_person, idx_admin_purge_comment_post, idx_mod_feature_post_post, idx_mod_lock_post_post, idx_mod_remove_post_post, idx_person_liked_combined_post, idx_person_saved_combined_post, idx_private_message_recipient, idx_comment_report_resolver, idx_community_report_resolver, idx_post_report_resolver, idx_private_message_report_resolver, idx_local_site_suggested_communities, idx_post_tag_tag, idx_local_image_thumbnail_post; diff --git a/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/up.sql b/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/up.sql index 2b1370f31..37d22b580 100644 --- a/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/up.sql +++ b/migrations/2025-07-18-033358_add_missing_foreign_key_indexes/up.sql @@ -14,8 +14,6 @@ CREATE INDEX idx_admin_purge_post_admin ON admin_purge_post (admin_person_id); CREATE INDEX idx_mod_remove_comment_comment ON mod_remove_comment (comment_id); -CREATE INDEX idx_person_comment_mention_comment ON person_comment_mention (comment_id); - CREATE INDEX idx_person_liked_combined_comment ON person_liked_combined (comment_id); CREATE INDEX idx_person_saved_combined_comment ON person_saved_combined (comment_id); @@ -120,8 +118,6 @@ CREATE INDEX idx_mod_remove_post_post ON mod_remove_post (post_id); CREATE INDEX idx_person_liked_combined_post ON person_liked_combined (post_id); -CREATE INDEX idx_person_post_mention_post ON person_post_mention (post_id); - CREATE INDEX idx_person_saved_combined_post ON person_saved_combined (post_id); CREATE INDEX idx_private_message_recipient ON private_message (recipient_id);