Skip to content
代码片段 群组 项目
提交 0a7399ec 编辑于 作者: Adam Hegyi's avatar Adam Hegyi
浏览文件

Merge branch 'add-repository-size-limit-index' into 'master'

Add index to projects on namespace_id and repository_size_limit

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127382



Merged-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Approved-by: default avatarMohamed Hamda <mhamda@gitlab.com>
Approved-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Reviewed-by: default avatarMohamed Hamda <mhamda@gitlab.com>
Co-authored-by: default avatarRobert May <rmay@gitlab.com>
No related branches found
No related tags found
无相关合并请求
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class IndexProjectsOnNamespaceIdAndRepositorySizeLimit < Gitlab::Database::Migration[2.1]
INDEX_NAME = "index_projects_on_namespace_id_and_repository_size_limit"
disable_ddl_transaction!
def up
add_concurrent_index :projects, [:namespace_id, :repository_size_limit], name: INDEX_NAME
end
def down
remove_concurrent_index :projects, [:namespace_id, :repository_size_limit], name: INDEX_NAME
end
end
4047c6746335957fc3d274036e20a176080fb7aa695a98667ed9170370960212
\ No newline at end of file
...@@ -32728,6 +32728,8 @@ CREATE INDEX index_projects_on_name_trigram ON projects USING gin (name gin_trgm ...@@ -32728,6 +32728,8 @@ CREATE INDEX index_projects_on_name_trigram ON projects USING gin (name gin_trgm
   
CREATE INDEX index_projects_on_namespace_id_and_id ON projects USING btree (namespace_id, id); CREATE INDEX index_projects_on_namespace_id_and_id ON projects USING btree (namespace_id, id);
   
CREATE INDEX index_projects_on_namespace_id_and_repository_size_limit ON projects USING btree (namespace_id, repository_size_limit);
CREATE INDEX index_projects_on_path_and_id ON projects USING btree (path, id); CREATE INDEX index_projects_on_path_and_id ON projects USING btree (path, id);
   
CREATE INDEX index_projects_on_path_trigram ON projects USING gin (path gin_trgm_ops); CREATE INDEX index_projects_on_path_trigram ON projects USING gin (path gin_trgm_ops);
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册