Commit 27c4a288 authored by Alishan Ladhani's avatar Alishan Ladhani Committed by Alper Akgun

Remove unused index index_for_resource_group on ci_builds

A new index was recently added to cover this use case.

Changelog: performance
parent e5881afe
# frozen_string_literal: true
class RemoveIndexForResourceGroup < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'index_for_resource_group'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :ci_builds, INDEX_NAME
end
def down
# rubocop:disable Migration/PreventIndexCreation
add_concurrent_index :ci_builds, [:resource_group_id, :id], where: 'resource_group_id IS NOT NULL', name: INDEX_NAME
# rubocop:enable Migration/PreventIndexCreation
end
end
06cbecc52e62a48664ae486181047d8ca4d71a7991ba36bdca4bfa44257627f3
\ No newline at end of file
......@@ -25893,8 +25893,6 @@ CREATE UNIQUE INDEX index_feature_gates_on_feature_key_and_key_and_value ON feat
CREATE UNIQUE INDEX index_features_on_key ON features USING btree (key);
CREATE INDEX index_for_resource_group ON ci_builds USING btree (resource_group_id, id) WHERE (resource_group_id IS NOT NULL);
CREATE INDEX index_for_status_per_branch_per_project ON merge_trains USING btree (target_project_id, target_branch, status);
CREATE INDEX index_fork_network_members_on_fork_network_id ON fork_network_members USING btree (fork_network_id);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment