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

Merge branch...

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

Add NOT NULL for sharding key on audit_events_streaming_event_type_filters

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



Merged-by: default avatarOmar Qunsul <oqunsul@gitlab.com>
Approved-by: default avatarShubham Kumar <shukumar@gitlab.com>
Approved-by: default avatarOmar Qunsul <oqunsul@gitlab.com>
Co-authored-by: default avatarShane Maglangit <smaglangit@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -8,14 +8,6 @@ description: Represents a event type filter for audit event streaming
introduced_by_url:
milestone: '15.6'
gitlab_schema: gitlab_main_cell
desired_sharding_key:
group_id:
references: namespaces
backfill_via:
parent:
foreign_key: external_audit_event_destination_id
table: audit_events_external_audit_event_destinations
sharding_key: namespace_id
belongs_to: external_audit_event_destination
desired_sharding_key_migration_job_name: BackfillAuditEventsStreamingEventTypeFiltersGroupId
table_size: small
sharding_key:
group_id: namespaces
# frozen_string_literal: true
class AddAuditEventsStreamingEventTypeFiltersGroupIdNotNullConstraint < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '17.9'
def up
add_not_null_constraint :audit_events_streaming_event_type_filters, :group_id
end
def down
remove_not_null_constraint :audit_events_streaming_event_type_filters, :group_id
end
end
801fe2c582bc645bf339667f5cf783c2c6cbe62cc1b225cbc0451f8e52792b1e
\ No newline at end of file
......@@ -8644,6 +8644,7 @@ CREATE TABLE audit_events_streaming_event_type_filters (
external_audit_event_destination_id bigint NOT NULL,
audit_event_type text NOT NULL,
group_id bigint,
CONSTRAINT check_9eb6a21b47 CHECK ((group_id IS NOT NULL)),
CONSTRAINT check_d20c8e5a51 CHECK ((char_length(audit_event_type) <= 255))
);
 
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册