Commit 9037df8f authored by Adam Hegyi's avatar Adam Hegyi

Merge branch 'add_source_project_target_branch_index_to_merge_request' into 'master'

Add TargetProject And SourceBranch Index To MergeRequest

See merge request gitlab-org/gitlab!57691
parents 71aee14b 981bd07f
---
title: Add TargetProject And SourceBranch Index To MergeRequest
merge_request: 57691
author:
type: performance
# frozen_string_literal: true
class AddTargetProjectAndSourceBranchIndexToMergeRequest < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_merge_requests_on_target_project_id_and_source_branch'
disable_ddl_transaction!
def up
add_concurrent_index :merge_requests, [:target_project_id, :source_branch], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :epic_issues, INDEX_NAME
end
end
412d0cedef5c933c7de3a70ca2365fe0cfaa4087429ca418854092b6c37904f1
\ No newline at end of file
......@@ -23090,6 +23090,8 @@ CREATE INDEX index_merge_requests_on_target_project_id_and_iid_and_state_id ON m
CREATE INDEX index_merge_requests_on_target_project_id_and_iid_jira_title ON merge_requests USING btree (target_project_id, iid) WHERE ((title)::text ~ '[A-Z][A-Z_0-9]+-\d+'::text);
CREATE INDEX index_merge_requests_on_target_project_id_and_source_branch ON merge_requests USING btree (target_project_id, source_branch);
CREATE INDEX index_merge_requests_on_target_project_id_and_squash_commit_sha ON merge_requests USING btree (target_project_id, squash_commit_sha);
CREATE INDEX index_merge_requests_on_target_project_id_and_target_branch ON merge_requests USING btree (target_project_id, target_branch) WHERE ((state_id = 1) AND (merge_when_pipeline_succeeds = true));
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