Commit fc89169b authored by Nick Thomas's avatar Nick Thomas

Fix two migrations to satisfy the Migration/AddConcurrentIndex cop

parent 088172b2
...@@ -5,8 +5,13 @@ class AddIndexesToMirrors < ActiveRecord::Migration ...@@ -5,8 +5,13 @@ class AddIndexesToMirrors < ActiveRecord::Migration
disable_ddl_transaction! disable_ddl_transaction!
def change def up
add_concurrent_index :projects, [:sync_time] add_concurrent_index :projects, [:sync_time]
add_concurrent_index :remote_mirrors, [:sync_time] add_concurrent_index :remote_mirrors, [:sync_time]
end end
def down
remove_index :projects, [:sync_time]
remove_index :remote_mirrors, [:sync_time]
end
end end
...@@ -5,8 +5,13 @@ class AddIndexToMirrorsLastUpdateAtFields < ActiveRecord::Migration ...@@ -5,8 +5,13 @@ class AddIndexToMirrorsLastUpdateAtFields < ActiveRecord::Migration
disable_ddl_transaction! disable_ddl_transaction!
def change def up
add_concurrent_index :projects, :mirror_last_successful_update_at add_concurrent_index :projects, :mirror_last_successful_update_at
add_concurrent_index :remote_mirrors, :last_successful_update_at add_concurrent_index :remote_mirrors, :last_successful_update_at
end end
def down
remove_index :projects, :mirror_last_successful_update_at
remove_index :remote_mirrors, :last_successful_update_at
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