Commit 30a60ee4 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'dz-improve-ci-id-migration' into 'master'

Add extra checks for ci_id migration

See merge request gitlab-org/gitlab-ce!28404
parents 0b12a574 5786de36
......@@ -22,7 +22,12 @@ class DropProjectsCiId < ActiveRecord::Migration[5.1]
end
def down
add_column :projects, :ci_id, :integer
add_concurrent_index :projects, :ci_id
unless column_exists?(:projects, :ci_id)
add_column :projects, :ci_id, :integer
end
unless index_exists?(:projects, :ci_id)
add_concurrent_index :projects, :ci_id
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