Commit 2cbad987 authored by Toon Claes's avatar Toon Claes

Merge branch...

Merge branch '230835-add-index-of-merge_request_id-on-approval-merge-request-rules-table' into 'master'

Add index of merge_request_id and rule_type

Closes #230835

See merge request gitlab-org/gitlab!40556
parents e70bdbd6 b713d921
---
title: Add index on merge_request_id to approval_merge_request_rules
merge_request: 40556
author:
type: other
# frozen_string_literal: true
class AddIndexOnMergeRequestIdAndRuleTypeToApprovalMergeRequestRule < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
INDEX_NAME = "approval_mr_rule_index_merge_request_id"
def up
add_concurrent_index(
:approval_merge_request_rules,
:merge_request_id,
name: INDEX_NAME
)
end
def down
remove_concurrent_index_by_name :approval_merge_request_rules, INDEX_NAME
end
end
360c42f4d34c3b03e7a0375a0ff2776f066888f0a40131180bf301b876ea58db
\ No newline at end of file
......@@ -18945,6 +18945,8 @@ CREATE UNIQUE INDEX any_approver_merge_request_rule_type_unique_index ON public.
CREATE UNIQUE INDEX any_approver_project_rule_type_unique_index ON public.approval_project_rules USING btree (project_id) WHERE (rule_type = 3);
CREATE INDEX approval_mr_rule_index_merge_request_id ON public.approval_merge_request_rules USING btree (merge_request_id);
CREATE UNIQUE INDEX approval_rule_name_index_for_code_owners ON public.approval_merge_request_rules USING btree (merge_request_id, code_owner, name) WHERE ((code_owner = true) AND (section IS NULL));
CREATE UNIQUE INDEX backup_labels_group_id_project_id_title_idx ON public.backup_labels USING btree (group_id, project_id, title);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment