Remove `tmp_index_merge_requests_draft_and_status_leaky_regex`
This temporary index was added to support !70735 (merged), but can be removed now that it has been merged and deployed.
Related to #341529 (closed)
Database
Up
== 20220422220507 RemoveTmpIndexSupportingLeakyRegexCleanup: migrating ========
-- transaction_open?()
-> 0.0000s
-- indexes(:merge_requests)
-> 0.0247s
-- execute("SET statement_timeout TO 0")
-> 0.0012s
-- remove_index(:merge_requests, {:algorithm=>:concurrently, :name=>"tmp_index_merge_requests_draft_and_status_leaky_regex"})
-> 0.0080s
-- execute("RESET statement_timeout")
-> 0.0011s
== 20220422220507 RemoveTmpIndexSupportingLeakyRegexCleanup: migrated (0.0477s)
Down
== 20220422220507 RemoveTmpIndexSupportingLeakyRegexCleanup: reverting ========
-- transaction_open?()
-> 0.0000s
-- index_exists?(:merge_requests, :id, {:where=>"draft = true AND state_id = 1 AND ((title)::text ~* '^\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP'::text) AND ((title)::text !~* '^(\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP)'::text)", :name=>"tmp_index_merge_requests_draft_and_status_leaky_regex", :algorithm=>:concurrently})
-> 0.0696s
-- execute("SET statement_timeout TO 0")
-> 0.0007s
-- add_index(:merge_requests, :id, {:where=>"draft = true AND state_id = 1 AND ((title)::text ~* '^\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP'::text) AND ((title)::text !~* '^(\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP)'::text)", :name=>"tmp_index_merge_requests_draft_and_status_leaky_regex", :algorithm=>:concurrently})
-> 0.0135s
-- execute("RESET statement_timeout")
-> 0.0009s
== 20220422220507 RemoveTmpIndexSupportingLeakyRegexCleanup: reverted (0.0954s)
Edited by Kerri Miller