diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb index 887632da20e..e1382318d3c 100644 --- a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb +++ b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb @@ -6,7 +6,13 @@ class AddIndexToNextRunAtAndActive < ActiveRecord::Migration DOWNTIME = false - def change - add_index :ci_trigger_schedules, [:active, :next_run_at] + disable_ddl_transaction! + + def up + add_concurrent_index :ci_trigger_schedules, [:active, :next_run_at] + end + + def down + remove_index :ci_trigger_schedules, [:active, :next_run_at] end end |