Commit 51d5357b authored by Sean McGivern's avatar Sean McGivern

Merge branch 'ab/fix-migration-multiple-indexes' into 'master'

Add guard to avoid misleading error message

See merge request gitlab-org/gitlab!19487
parents cc6c7a78 a341cb51
......@@ -15,7 +15,7 @@ class RemoveRendundantIndexFromReleases < ActiveRecord::Migration[5.2]
remove_concurrent_index_by_name :releases, 'index_releases_on_project_id'
# This is an extra index that is not present in db/schema.rb but known to exist on some installs
remove_concurrent_index_by_name :releases, 'releases_project_id_idx'
remove_concurrent_index_by_name :releases, 'releases_project_id_idx' if index_exists_by_name?(:releases, 'releases_project_id_idx')
end
def down
......
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