-
Notifications
You must be signed in to change notification settings - Fork 554
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
Support Modify Column
for MySQL dialect
#1216
Conversation
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.
(cherry picked from commit 6c27f05)
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.
Thanks @KKould! Left a comment re the column keyword, other than that the changes look reasonable to me
options, | ||
column_position, | ||
} => { | ||
write!(f, "MODIFY COLUMN {col_name} {data_type}")?; |
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.
It seems we'll need to track whether the COLUMN
keyword was specified? Otherwise the following wont fulfill round trip ALTER TABLE foo MODIFY mycolumn int
since the serialized version becomes ALTER TABLE foo MODIFY COLUMN mycolumn int
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.
CHANGE COLUMN
seems to have the same problem? I'm not sure if I need to address it all together here
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.
oh I see, yeah no need to tackle that one in this PR unless you feel its straight-forward and want to. for this PR main would be to ensure the behavior for modify column
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.
@KKould double checking: did you plan to update the PR for the MODIFY COLUMN
variant introduced?
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.
@KKould double checking: did you plan to update the PR for the
MODIFY COLUMN
variant introduced?
nope
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 agree it would be great to ensure this type of syntax roundtrips but no need to do it in this PR
cc @alamb changes LGTM for review |
options, | ||
column_position, | ||
} => { | ||
write!(f, "MODIFY COLUMN {col_name} {data_type}")?; |
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 agree it would be great to ensure this type of syntax roundtrips but no need to do it in this PR
Pull Request Test Coverage Report for Build 8679082248Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
(see https://dev.mysql.com/doc/refman/8.0/en/alter-table.html).