Commit c3b9b439 authored by Nick Thomas's avatar Nick Thomas

Fix two migrations to satisfy the Migration/AddConcurrentIndex cop

parent fc89169b
......@@ -11,7 +11,7 @@ class AddIndexesToMirrors < ActiveRecord::Migration
end
def down
remove_index :projects, [:sync_time]
remove_index :remote_mirrors, [:sync_time]
remove_index :projects, [:sync_time] if index_exists? :projects, [:sync_time]
remove_index :remote_mirrors, [:sync_time] if index_exists? :remote_mirrors, [:sync_time]
end
end
......@@ -11,7 +11,7 @@ class AddIndexToMirrorsLastUpdateAtFields < ActiveRecord::Migration
end
def down
remove_index :projects, :mirror_last_successful_update_at
remove_index :remote_mirrors, :last_successful_update_at
remove_index :projects, :mirror_last_successful_update_at if index_exists? :projects, :mirror_last_successful_update_at
remove_index :remote_mirrors, :last_successful_update_at if index_exists? :remote_mirrors, :last_successful_update_at
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