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)
...@@ -120,7 +120,7 @@ feature 'Triggers', feature: true, js: true do ...@@ -120,7 +120,7 @@ feature 'Triggers', feature: true, js: true do
visit edit_namespace_project_trigger_path(@project.namespace, @project, trigger) visit edit_namespace_project_trigger_path(@project.namespace, @project, trigger)
checkbox = find_field('trigger_trigger_schedule_attributes_active') checkbox = find_field('trigger_trigger_schedule_attributes_active')
expect(checkbox).not_to be_checked expect(checkbox).not_to be_checked
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