Skip to content
代码片段 群组 项目
未验证 提交 1ec707a1 编辑于 作者: Jon Jenkins's avatar Jon Jenkins 提交者: GitLab
浏览文件

Merge branch '467120/index-for-LFS' into 'master'

Add partial unique index for LFS objects for null repository_type

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



Merged-by: default avatarJon Jenkins <jjenkins@gitlab.com>
Approved-by: default avatarJaviera Tapia <jtapia@gitlab.com>
Approved-by: default avatarIrina Bronipolsky <ibronipolsky@gitlab.com>
Approved-by: default avatarJon Jenkins <jjenkins@gitlab.com>
Co-authored-by: default avatarEmma Park <epark@gitlab.com>
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
# frozen_string_literal: true
class AddUniqueIndexForLfsObjectsProjectsNullRepoType < Gitlab::Database::Migration[2.2]
milestone '17.10'
disable_ddl_transaction!
TABLE_NAME = :lfs_objects_projects
INDEX_NAME = 'lfs_objects_projects_on_project_id_lfs_object_id_null_repo_type'
def up
add_concurrent_index TABLE_NAME, [:project_id, :lfs_object_id],
unique: true,
where: "repository_type IS NULL",
name: INDEX_NAME
end
def down
remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
end
end
c30b9f2b16b88aadbfb3fad04c7d2b93ce792eeac01ff8dc75a9df0d4d3c114d
\ No newline at end of file
......@@ -36473,6 +36473,8 @@ CREATE UNIQUE INDEX issue_user_mentions_on_issue_id_index ON issue_user_mentions
 
CREATE UNIQUE INDEX kubernetes_namespaces_cluster_and_namespace ON clusters_kubernetes_namespaces USING btree (cluster_id, namespace);
 
CREATE UNIQUE INDEX lfs_objects_projects_on_project_id_lfs_object_id_null_repo_type ON lfs_objects_projects USING btree (project_id, lfs_object_id) WHERE (repository_type IS NULL);
CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_and_note_id_index ON merge_request_user_mentions USING btree (merge_request_id, note_id);
 
CREATE UNIQUE INDEX merge_request_user_mentions_on_mr_id_index ON merge_request_user_mentions USING btree (merge_request_id) WHERE (note_id IS NULL);
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册