-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnlineDDL: support --unsafe-allow-foreign-keys strategy flag #11976
OnlineDDL: support --unsafe-allow-foreign-keys strategy flag #11976
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Shlomi Noach <[email protected]>
go/vt/schema/ddl_strategy.go
Outdated
@@ -173,6 +174,11 @@ func (setting *DDLStrategySetting) IsVreplicationTestSuite() bool { | |||
return setting.hasFlag(vreplicationTestSuite) | |||
} | |||
|
|||
// IsAllowForeignKeysFlag checks if strategy options include -unsafe-allow-foreign-keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be double dash, just for consistency (super minor).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added double-dash
Not merging right now. @shlomi-noach can add the missing |
Signed-off-by: Shlomi Noach <[email protected]>
Description
A declarative enabling of foreign keys in
OnlineDDL
object and strategy. A new--unsafe-allow-foreign-keys
allows, when specified, the existence of foreign key constraints in a DDL statement. Without this flag any foreign key definition return an error.The flag is intentionally prefixed with
unsafe
to clearly indicate this is an incomplete work. We do not document this new flag in the meantime.Related Issue(s)
Foreign keys tracking issue: #11975
Checklist