Commit 5786de36 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add extra checks for ci_id migration

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f2cb5220
...@@ -22,7 +22,12 @@ class DropProjectsCiId < ActiveRecord::Migration[5.1] ...@@ -22,7 +22,12 @@ class DropProjectsCiId < ActiveRecord::Migration[5.1]
end end
def down def down
unless column_exists?(:projects, :ci_id)
add_column :projects, :ci_id, :integer add_column :projects, :ci_id, :integer
end
unless index_exists?(:projects, :ci_id)
add_concurrent_index :projects, :ci_id add_concurrent_index :projects, :ci_id
end 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