Read about our upcoming Code of Conduct on this issue

Commit ab680280 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

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 8a4dc00e3539
......@@ -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