diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-07 09:18:11 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-07 09:18:11 +0100 |
commit | adb6dd067037a3df1951b5dacae37a06541ec286 (patch) | |
tree | 08c152979b242d8c321fe941e4cc367c6afc5040 /db | |
parent | c30f4421749efc08051436496f2aec3269132412 (diff) | |
download | gitlab-ce-adb6dd067037a3df1951b5dacae37a06541ec286.tar.gz |
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.rb | 2 |
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 |