Commit 0872b854 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Another round of code review

parent 8d3f7979
...@@ -6,7 +6,13 @@ class AddIndexToNextRunAtAndActive < ActiveRecord::Migration ...@@ -6,7 +6,13 @@ class AddIndexToNextRunAtAndActive < ActiveRecord::Migration
DOWNTIME = false DOWNTIME = false
def change disable_ddl_transaction!
add_index :ci_trigger_schedules, [:active, :next_run_at]
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
end end
...@@ -106,7 +106,7 @@ feature 'Triggers', feature: true, js: true do ...@@ -106,7 +106,7 @@ feature 'Triggers', feature: true, js: true do
end end
end end
context 'enabling schedule' do context 'disabling schedule' do
before do before do
trigger.create_trigger_schedule(project: trigger.project, active: true) trigger.create_trigger_schedule(project: trigger.project, active: true)
......
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