-
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
Rename drop_constraints to drop_foreign_keys on MoveTables #10017
Rename drop_constraints to drop_foreign_keys on MoveTables #10017
Conversation
…raints on MoveTables Signed-off-by: Phani Raj <phani@planetscale.com>
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.
LGTM overall.
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.
I had one question but otherwise LGTM. Thanks!
go/vt/wrangler/materializer.go
Outdated
createDDLAsCopy = "copy" | ||
createDDLAsCopyDropConstraint = "copy:drop_constraint" | ||
createDDLAsCopy = "copy" | ||
createDDLAsCopyDropConstraint = "copy:drop_constraint" |
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.
Do we still need this? Or do we want to support dropping FK and Check constraints at some point? Note that TableSpec.Constraints
is aware of both and we seem to only care bout FK constraints here: https://github.com/vitessio/vitess/pull/10017/files#diff-9a8066951e861d9d5329f7cf03e5b70e60cbe19226c2a903efeb19c63781d8ceR1091-R1093
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.
Can we say authoritatively that we will never need to drop all constraints? If so, we will need to run a deprecation cycle to remove copy:drop_constraint
, since it is possible there are applications using this flag at the moment.
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.
Yeah, that makes sense.
Signed-off-by: Phani Raj <phani@planetscale.com>
…-move-tables Signed-off-by: Phani Raj <phani@planetscale.com>
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.
lgtm
Signed-off-by: Phani Raj phani@planetscale.com
Description
As a follow-up to #9904, we're renaming
drop_constraints
todrop_foreign_keys
on all tables when a user chooses to do so, on running MoveTables.Related Issue(s)
N/A
Checklist