Skip to content
代码片段 群组 项目
未验证 提交 52b0857b 编辑于 作者: Prabakaran Murugesan's avatar Prabakaran Murugesan 提交者: GitLab
浏览文件

Merge branch '493768-sharding-key-not-null-draft_notes' into 'master'

No related branches found
No related tags found
无相关合并请求
......@@ -8,14 +8,6 @@ description: Notes created during the review of an MR that are not yet published
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4213
milestone: '11.4'
gitlab_schema: gitlab_main_cell
desired_sharding_key:
project_id:
references: projects
backfill_via:
parent:
foreign_key: merge_request_id
table: merge_requests
sharding_key: target_project_id
belongs_to: merge_request
desired_sharding_key_migration_job_name: BackfillDraftNotesProjectId
table_size: small
sharding_key:
project_id: projects
# frozen_string_literal: true
class ValidateDraftNotesProjectIdNotNullConstraint < Gitlab::Database::Migration[2.2]
milestone '17.10'
def up
validate_not_null_constraint :draft_notes, :project_id
end
def down
# no-op
end
end
17898021bbd8b5bdef675c73e0aef30a77b0cbbeb6348b89e75f2b4837ec58b4
\ No newline at end of file
......@@ -13115,6 +13115,7 @@ CREATE TABLE draft_notes (
internal boolean DEFAULT false NOT NULL,
note_type smallint,
project_id bigint,
CONSTRAINT check_2a752d05fe CHECK ((project_id IS NOT NULL)),
CONSTRAINT check_c497a94a0e CHECK ((char_length(line_code) <= 255))
);
 
......@@ -27269,9 +27270,6 @@ ALTER TABLE ONLY chat_names
ALTER TABLE ONLY chat_teams
ADD CONSTRAINT chat_teams_pkey PRIMARY KEY (id);
 
ALTER TABLE draft_notes
ADD CONSTRAINT check_2a752d05fe CHECK ((project_id IS NOT NULL)) NOT VALID;
ALTER TABLE workspaces
ADD CONSTRAINT check_2a89035b04 CHECK ((personal_access_token_id IS NOT NULL)) NOT VALID;
 
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册