Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-02-07 11:18:11 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-02-07 11:18:11 +0300
commitadb6dd067037a3df1951b5dacae37a06541ec286 (patch)
tree08c152979b242d8c321fe941e4cc367c6afc5040 /db
parentc30f4421749efc08051436496f2aec3269132412 (diff)
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.
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb b/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
index d896bb52347..1962c16d84a 100644
--- a/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
+++ b/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
@@ -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