Commit f0b38873 authored by Stan Hu's avatar Stan Hu

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

Explicitly remove index by name

See merge request gitlab-org/gitlab!19362
parents 22bb21fb c0ba146b
...@@ -12,10 +12,13 @@ class RemoveRendundantIndexFromReleases < ActiveRecord::Migration[5.2] ...@@ -12,10 +12,13 @@ class RemoveRendundantIndexFromReleases < ActiveRecord::Migration[5.2]
disable_ddl_transaction! disable_ddl_transaction!
def up def up
remove_concurrent_index :releases, :project_id 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'
end end
def down def down
add_concurrent_index :releases, :project_id add_concurrent_index :releases, :project_id, name: 'index_releases_on_project_id'
end end
end end
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