diff --git a/db/post_migrate/20231122124815_drop_index_bulk_import_batch_trackers_on_tracker_id.rb b/db/post_migrate/20231122124815_drop_index_bulk_import_batch_trackers_on_tracker_id.rb new file mode 100644 index 0000000000000000000000000000000000000000..46e0df5cde93d46b0ed5baffde4c0b9eb7fd68bf --- /dev/null +++ b/db/post_migrate/20231122124815_drop_index_bulk_import_batch_trackers_on_tracker_id.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class DropIndexBulkImportBatchTrackersOnTrackerId < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + + milestone '16.7' + + INDEX_NAME = :index_bulk_import_batch_trackers_on_tracker_id + TABLE_NAME = :bulk_import_batch_trackers + + def up + remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME + end + + def down + add_concurrent_index TABLE_NAME, :tracker_id, name: INDEX_NAME + end +end diff --git a/db/schema_migrations/20231122124815 b/db/schema_migrations/20231122124815 new file mode 100644 index 0000000000000000000000000000000000000000..9e80aa2067bfaee92d642b77f5e1ce38d709f6c6 --- /dev/null +++ b/db/schema_migrations/20231122124815 @@ -0,0 +1 @@ +ee23092caa9be8dc1f4931f0157897c1219bc4326d7de090026439996ea0cdaf \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 902e468718c63ae1de3033f819a4a042c7f15e4a..4e83d5bac7b56babb457c9b82acbb40a61f26a4d 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -31821,8 +31821,6 @@ CREATE INDEX index_boards_on_project_id ON boards USING btree (project_id); CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON broadcast_messages USING btree (ends_at, broadcast_type, id); -CREATE INDEX index_bulk_import_batch_trackers_on_tracker_id ON bulk_import_batch_trackers USING btree (tracker_id); - CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id); CREATE INDEX index_bulk_import_entities_on_bulk_import_id_and_status ON bulk_import_entities USING btree (bulk_import_id, status); diff --git a/spec/support/helpers/database/duplicate_indexes.yml b/spec/support/helpers/database/duplicate_indexes.yml index f5504c33eaa9c40d879e4af7c75e5fafcac68f56..fb939acf762922bfffe55d8a8e5532297adba9fe 100644 --- a/spec/support/helpers/database/duplicate_indexes.yml +++ b/spec/support/helpers/database/duplicate_indexes.yml @@ -27,9 +27,6 @@ boards_epic_board_recent_visits: boards_epic_user_preferences: index_boards_epic_user_preferences_on_board_user_epic_unique: - index_boards_epic_user_preferences_on_board_id -bulk_import_batch_trackers: - i_bulk_import_trackers_id_batch_number: - - index_bulk_import_batch_trackers_on_tracker_id bulk_import_export_batches: i_bulk_import_export_batches_id_batch_number: - index_bulk_import_export_batches_on_export_id