-
-
Notifications
You must be signed in to change notification settings - Fork 108
Fix #430 - ALTER TABLE … RENAME COLUMN … TO …
is not understood by the parser/linter
#432
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
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## 5.8.x #432 +/- ##
============================================
+ Coverage 97.04% 97.07% +0.03%
+ Complexity 2209 2182 -27
============================================
Files 69 69
Lines 5083 4999 -84
============================================
- Hits 4933 4853 -80
+ Misses 150 146 -4
... and 50 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Failing checks are only due to unmodified files. I don't expect to fix them on this PR. |
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.
Looks good !
Out of curiosity, what happens to a query that renames two columns and also renames an index ?
Is it possible ?
https://dev.mysql.com/doc/refman/8.0/en/alter-table.html
This worth a unit test to check 😆 On MySQL, it is possible and it works fine. But I don't know how the parser manages it. |
Unit tests added via a provider to easily add some more. And after some tests, it appears that there was just an extra space in the builder but after a trim, everything works fine ;) |
Ah, the base is not the right one. Can you rebase onto 5.8.x ? |
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.
All green ✅
ALTER TABLE … RENAME COLUMN … TO …
is not understood by the parser/linter
Pull-request: #432 Signed-off-by: William Desportes <williamdes@wdes.fr>
Fixes #430
I agree that this PR adds a specific management case for the RENAME COLUMN. If you find this too specific, you could try to give me hints on how to do this in a cleaner way, as I'm unsure this could be possible.
Thanks.