diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 06:09:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 06:09:59 +0000 |
commit | ba2e4183d9b07237657595821cd06689667e6762 (patch) | |
tree | 86a79db72443845747291b4e567888f4b6148a93 /db | |
parent | e83144f0eef1a161b69d2b991841674978014283 (diff) | |
download | gitlab-ce-ba2e4183d9b07237657595821cd06689667e6762.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb | 15 | ||||
-rw-r--r-- | db/schema_migrations/20221010141500 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb b/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb new file mode 100644 index 00000000000..5b9d5be2b3f --- /dev/null +++ b/db/post_migrate/20221010141500_add_index_author_id_target_project_id_on_merge_requests.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddIndexAuthorIdTargetProjectIdOnMergeRequests < Gitlab::Database::Migration[2.0] + INDEX_NAME = 'index_merge_requests_on_author_id_and_target_project_id' + + disable_ddl_transaction! + + def up + add_concurrent_index :merge_requests, %i[author_id target_project_id], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :merge_requests, INDEX_NAME + end +end diff --git a/db/schema_migrations/20221010141500 b/db/schema_migrations/20221010141500 new file mode 100644 index 00000000000..8479fb0519c --- /dev/null +++ b/db/schema_migrations/20221010141500 @@ -0,0 +1 @@ +250ec3ff701dacd333d669f128762e9f035a626f2f7720c6e7e1dc61499d431d
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 2dab5e7abc9..13ba431e5e5 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -29481,6 +29481,8 @@ CREATE INDEX index_merge_requests_on_assignee_id ON merge_requests USING btree ( CREATE INDEX index_merge_requests_on_author_id ON merge_requests USING btree (author_id); +CREATE INDEX index_merge_requests_on_author_id_and_target_project_id ON merge_requests USING btree (author_id, target_project_id); + CREATE INDEX index_merge_requests_on_created_at ON merge_requests USING btree (created_at); CREATE INDEX index_merge_requests_on_description_trigram ON merge_requests USING gin (description gin_trgm_ops); |