We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
1.13.0
The syntax for renaming a column in mysql 5.7 is e.g.:
ALTER TABLE mytable CHANGE old_col_name new_col_name VARCHAR(100) NOT NULL;
In mysql >8, the simpler syntax is:
ALTER TABLE mytable RENAME old_col_name TO new_col_name;
sqlc supports the mysql 8 syntax, but it does not pick up column renames using the CHANGE keyword in the mysql 5.7 syntax.
CHANGE
mysql 5.7 (broken): https://play.sqlc.dev/p/ce3be8094d518dd98ca61b9d8de5d5c59de5db37c577526cd2ce510b62dab9b5
mysql >8 (working): https://play.sqlc.dev/p/a75ba62f791672e217f0a5bd73683f9a4f3a1364434e67015e09ba86d3222a30
No response
https://play.sqlc.dev/p/ce3be8094d518dd98ca61b9d8de5d5c59de5db37c577526cd2ce510b62dab9b5
macOS
MySQL
Go
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Version
1.13.0
What happened?
The syntax for renaming a column in mysql 5.7 is e.g.:
In mysql >8, the simpler syntax is:
sqlc supports the mysql 8 syntax, but it does not pick up column renames using the
CHANGE
keyword in the mysql 5.7 syntax.mysql 5.7 (broken):
https://play.sqlc.dev/p/ce3be8094d518dd98ca61b9d8de5d5c59de5db37c577526cd2ce510b62dab9b5
mysql >8 (working):
https://play.sqlc.dev/p/a75ba62f791672e217f0a5bd73683f9a4f3a1364434e67015e09ba86d3222a30
Relevant log output
No response
Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
https://play.sqlc.dev/p/ce3be8094d518dd98ca61b9d8de5d5c59de5db37c577526cd2ce510b62dab9b5
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: