Skip to content
代码片段 群组 项目
未验证 提交 2fdaecf4 编辑于 作者: Leonardo da Rosa's avatar Leonardo da Rosa 提交者: GitLab
浏览文件

Merge branch...

Merge branch '493768--add-not-null-constraint-sharding-key-vulnerability_state_transitions' into 'master' 

Add NOT NULL on sharding key for vulnerability_state_transitions

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



Merged-by: default avatarLeonardo da Rosa <ldarosa@gitlab.com>
Approved-by: default avatarShubham Kumar <shukumar@gitlab.com>
Approved-by: default avatarLeonardo da Rosa <ldarosa@gitlab.com>
Reviewed-by: default avatarLeonardo da Rosa <ldarosa@gitlab.com>
Co-authored-by: default avatarShane Maglangit <smaglangit@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
......@@ -12,14 +12,6 @@ schema_inconsistencies:
- type: missing_indexes
object_name: index_vulnerability_state_transitions_resolved_activity
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/176561
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: vulnerability_id
table: vulnerabilities
sharding_key: project_id
belongs_to: vulnerability
desired_sharding_key_migration_job_name: BackfillVulnerabilityStateTransitionsProjectId
table_size: medium
sharding_key:
project_id: projects
# frozen_string_literal: true
class AddVulnerabilityStateTransitionsProjectIdNotNull < Gitlab::Database::Migration[2.2]
milestone '17.10'
disable_ddl_transaction!
def up
add_not_null_constraint :vulnerability_state_transitions, :project_id
end
def down
remove_not_null_constraint :vulnerability_state_transitions, :project_id
end
end
5a1ff535b4a4b36c1c3a3be15233f01c121ad53085668cc248dec54c7e1c0649
\ No newline at end of file
......@@ -24088,6 +24088,7 @@ CREATE TABLE vulnerability_state_transitions (
comment text,
dismissal_reason smallint,
project_id bigint,
CONSTRAINT check_b6338547d4 CHECK ((project_id IS NOT NULL)),
CONSTRAINT check_fe2eb6a0f3 CHECK ((char_length(comment) <= 50000))
);
 
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册