From fb8dc28c67cd04f09c5a53a2f543bc64b69bab1e Mon Sep 17 00:00:00 2001 From: Nicolas Dular Date: Tue, 29 Jul 2025 14:59:04 +0200 Subject: [PATCH] Remove index issues_on_duplicated_to_id Removes issues_on_duplicated_to_id index since we don't use the column for filtering issue lists. The index is not (or barely) used right now. Changelog: changed --- ...25313_remove_issues_on_duplicated_id_index.rb | 16 ++++++++++++++++ db/schema_migrations/20250729125313 | 1 + 2 files changed, 17 insertions(+) create mode 100644 db/post_migrate/20250729125313_remove_issues_on_duplicated_id_index.rb create mode 100644 db/schema_migrations/20250729125313 diff --git a/db/post_migrate/20250729125313_remove_issues_on_duplicated_id_index.rb b/db/post_migrate/20250729125313_remove_issues_on_duplicated_id_index.rb new file mode 100644 index 00000000000000..c57dfbdd3fdb23 --- /dev/null +++ b/db/post_migrate/20250729125313_remove_issues_on_duplicated_id_index.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class RemoveIssuesOnDuplicatedIdIndex < Gitlab::Database::Migration[2.3] + milestone '18.3' + + INDEX_NAME = 'index_issues_on_duplicated_to_id' + + # Index to be destroyed synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/557893 + def up + prepare_async_index_removal :issues, :duplicated_to_id, name: INDEX_NAME + end + + def down + unprepare_async_index :issues, :duplicated_to_id, name: INDEX_NAME + end +end diff --git a/db/schema_migrations/20250729125313 b/db/schema_migrations/20250729125313 new file mode 100644 index 00000000000000..d68a130a8e3875 --- /dev/null +++ b/db/schema_migrations/20250729125313 @@ -0,0 +1 @@ +abc052dcc0be269a28a8aead1228bcd5441d647715b48298e2da5ea0d526eae3 \ No newline at end of file -- GitLab