diff options
Diffstat (limited to 'db/post_migrate/20210923133143_remove_redundant_taggings_index.rb')
-rw-r--r-- | db/post_migrate/20210923133143_remove_redundant_taggings_index.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20210923133143_remove_redundant_taggings_index.rb b/db/post_migrate/20210923133143_remove_redundant_taggings_index.rb new file mode 100644 index 00000000000..a33885cc87b --- /dev/null +++ b/db/post_migrate/20210923133143_remove_redundant_taggings_index.rb @@ -0,0 +1,15 @@ +# 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 |