Resolve "Inconsistent schema - tmp_index_ci_pipelines_lock_version index"
What does this MR do and why?
In this MR, we are removing the following index (if exists):
tmp_index_ci_pipelines_lock_version
up:
== 20220109133006 RemoveCiPipelinesLockVersionIndex: migrating ================
-- transaction_open?()
-> 0.0000s
-- index_exists?(:ci_pipelines, :id, {:where=>"lock_version IS NULL", :name=>"tmp_index_ci_pipelines_lock_version", :algorithm=>:concurrently})
-> 0.0074s
-- remove_index(:ci_pipelines, {:where=>"lock_version IS NULL", :name=>"tmp_index_ci_pipelines_lock_version", :algorithm=>:concurrently, :column=>:id})
-> 0.0076s
== 20220109133006 RemoveCiPipelinesLockVersionIndex: migrated (0.0163s) =======
down:
== 20220109133006 RemoveCiPipelinesLockVersionIndex: reverting ================
-- transaction_open?()
-> 0.0000s
-- index_exists?(:ci_pipelines, :id, {:where=>"lock_version IS NULL", :name=>"tmp_index_ci_pipelines_lock_version", :algorithm=>:concurrently})
-> 0.0086s
-- execute("SET statement_timeout TO 0")
-> 0.0005s
-- add_index(:ci_pipelines, :id, {:where=>"lock_version IS NULL", :name=>"tmp_index_ci_pipelines_lock_version", :algorithm=>:concurrently})
-> 0.0024s
-- execute("RESET statement_timeout")
-> 0.0005s
== 20220109133006 RemoveCiPipelinesLockVersionIndex: reverted (0.0137s) =======
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #349549 (closed)
Edited by Diogo Frazão