Commit adb6dd06 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Remove old index after executing a query in stages migration

This makes it possible to heavily optimize this migration, because we
need an outdated index to remove redundant stages faster.
parent c30f4421
......@@ -6,8 +6,8 @@ class RemoveRedundantPipelineStages < ActiveRecord::Migration
disable_ddl_transaction!
def up(attempts: 100)
remove_outdated_index!
remove_redundant_pipeline_stages!
remove_outdated_index!
add_unique_index!
rescue ActiveRecord::RecordNotUnique
retry if (attempts -= 1) > 0
......
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