Commit 7105e36c authored by Tiger Watson's avatar Tiger Watson

Merge branch '297503-cablett-remove-index' into 'master'

Remove unneeded index

See merge request gitlab-org/gitlab!51676
parents c320abc3 6fc5b843
---
title: Remove unneeded group label index
merge_request: 51676
author:
type: other
# frozen_string_literal: true
class RemoveGroupIdTitleIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
INDEX_NAME = 'index_labels_on_group_id_and_title_with_null_project_id'
LABELS_TABLE = :labels
def up
remove_concurrent_index_by_name LABELS_TABLE, INDEX_NAME
end
def down
add_concurrent_index LABELS_TABLE, [:group_id, :title], where: 'project_id IS NULL', name: INDEX_NAME
end
end
69aae8d967fdb8af816a969fd818ed325b8d780b4faaa205c78a66c5d533ab2a
\ No newline at end of file
......@@ -22045,8 +22045,6 @@ CREATE UNIQUE INDEX index_labels_on_group_id_and_project_id_and_title ON labels
CREATE UNIQUE INDEX index_labels_on_group_id_and_title_unique ON labels USING btree (group_id, title) WHERE (project_id IS NULL);
CREATE INDEX index_labels_on_group_id_and_title_with_null_project_id ON labels USING btree (group_id, title) WHERE (project_id IS NULL);
CREATE INDEX index_labels_on_project_id ON labels USING btree (project_id);
CREATE UNIQUE INDEX index_labels_on_project_id_and_title_unique ON labels USING btree (project_id, title) WHERE (group_id IS NULL);
......
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