Skip to content

Draft: Remove tmp_index_merge_requests_draft_and_status

What does this MR do?

Removes the temporary index added in !63703 (merged) to help enable the background migration contained therein. With the migration completed, the index can be removed, as it is no longer needed.

Migration code is copied from the up/down actions contained in !63703 (merged)

Database

UP

== 20210724013206 RemoveTmpIndexMergeRequestsDraftAndStatus: migrating ========
-- transaction_open?()
   -> 0.0000s
-- indexes(:merge_requests)
   -> 0.0142s
-- execute("SET statement_timeout TO 0")
   -> 0.0005s
-- remove_index(:merge_requests, {:algorithm=>:concurrently, :name=>"tmp_index_merge_requests_draft_and_status"})
   -> 0.0029s
-- execute("RESET ALL")
   -> 0.0005s
== 20210724013206 RemoveTmpIndexMergeRequestsDraftAndStatus: migrated (0.0191s)

DOWN

== 20210724013206 RemoveTmpIndexMergeRequestsDraftAndStatus: reverting ========
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:merge_requests, :id, {:where=>"draft = false AND state_id = 1 AND ((title)::text ~* '^\\[draft\\]|\\(draft\\)|draft:|draft|\\[WIP\\]|WIP:|WIP'::text)", :name=>"tmp_index_merge_requests_draft_and_status", :algorithm=>:concurrently})
   -> 0.0134s
== 20210724013206 RemoveTmpIndexMergeRequestsDraftAndStatus: reverted (0.0141s)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #333947 (closed)

Edited by Kerri Miller

Merge request reports