Skip to content
Snippets Groups Projects
Verified Commit 9011c792 authored by Michał Zając's avatar Michał Zając Committed by GitLab
Browse files

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

Add NOT NULL for sharding key on work_item_parent_links

See merge request !177413



Merged-by: default avatarMichał Zając <mzajac@gitlab.com>
Approved-by: default avatarShubham Kumar <shukumar@gitlab.com>
Approved-by: default avatarMichał Zając <mzajac@gitlab.com>
Co-authored-by: Shane Maglangit's avatarShane Maglangit <smaglangit@gitlab.com>
parents cbe7441b 14cc21b8
No related branches found
No related tags found
2 merge requests!181325Fix ambiguous `created_at` in project.rb,!177413Add NOT NULL for sharding key on work_item_parent_links
Pipeline #1648690925 failed
# frozen_string_literal: true
class AddWorkItemParentLinksNamespaceIdNotNullConstraint < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '17.9'
def up
add_not_null_constraint :work_item_parent_links, :namespace_id, validate: false
end
def down
remove_not_null_constraint :work_item_parent_links, :namespace_id
end
end
# frozen_string_literal: true
class PrepareWorkItemParentLinksNamespaceIdNotNullValidation < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '17.9'
CONSTRAINT_NAME = :check_e9c0111985
def up
prepare_async_check_constraint_validation :work_item_parent_links, name: CONSTRAINT_NAME
end
def down
unprepare_async_check_constraint_validation :work_item_parent_links, name: CONSTRAINT_NAME
end
end
38f97ea8b802cadc8a9229b28e873c3341b3fe541a2d9fba227cfacb59d86175
\ No newline at end of file
5f17ac64ac5efe1e338631f6e028ccfed095aeb916ebabd39fa7b2d299fb62f9
\ No newline at end of file
......@@ -26594,6 +26594,9 @@ ALTER TABLE web_hook_logs
ALTER TABLE vulnerability_finding_evidences
ADD CONSTRAINT check_e8f37f70eb CHECK ((project_id IS NOT NULL)) NOT VALID;
 
ALTER TABLE work_item_parent_links
ADD CONSTRAINT check_e9c0111985 CHECK ((namespace_id IS NOT NULL)) NOT VALID;
ALTER TABLE project_relation_exports
ADD CONSTRAINT check_f461e3537f CHECK ((project_id IS NOT NULL)) NOT VALID;
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment