Commit 5124a037 authored by pbair's avatar pbair

Remove redundant index on taggings table

Remove index `index_taggings_on_taggable_id_and_taggable_type`. The
index `index_taggings_on_taggable_id_and_taggable_type_and_context`
already has the same leading columns.

Changelog: other
parent 4c93874c
# frozen_string_literal: true
class RemoveRedundantTaggingsIndex < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX_NAME = :index_taggings_on_taggable_id_and_taggable_type
def up
remove_concurrent_index_by_name :taggings, INDEX_NAME
end
def down
add_concurrent_index :taggings, [:taggable_id, :taggable_type], name: INDEX_NAME
end
end
d2736a06009d6232d832a03d6842a81b1de2ce79b901331a0e09ac40fc51a463
\ No newline at end of file
......@@ -26510,8 +26510,6 @@ CREATE UNIQUE INDEX index_system_note_metadata_on_note_id ON system_note_metadat
CREATE INDEX index_taggings_on_tag_id ON taggings USING btree (tag_id);
CREATE INDEX index_taggings_on_taggable_id_and_taggable_type ON taggings USING btree (taggable_id, taggable_type);
CREATE INDEX index_taggings_on_taggable_id_and_taggable_type_and_context ON taggings USING btree (taggable_id, taggable_type, context);
CREATE UNIQUE INDEX index_tags_on_name ON tags USING btree (name);
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