Skip to content
代码片段 群组 项目
提交 93d511e7 编辑于 作者: Emma Park's avatar Emma Park
浏览文件

Ensure unique index for LFS objects with repository_type

We already have a uniqueness validation on the LfsObjectsProject model
for (project_id, lfs_object_id, repository_type),
but we were missing a database-level unique index.
This index enforces data integrity at the database level
and allows safe usage of ApplicationRecord#safe_find_or_create_by.

The index lfs_objects_projects_on_project_id_lfs_object_id_with_repo_type
was already created asynchronously in a prior post-deployment migration.
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/179613

This commit ensures that it is properly created synchronously
for all installations, updating the schema definition accordingly.
上级 831ed014
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册