We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.27.0
Parsing DB migration file with setting the default value of a column to ('') causes a syntax error.
It works without enclosing the single-quotes in parentheses, but this value does not work with the goose migration tool
sqlc generate failed. # package schema.sql:7:69: syntax error near "'');" "
CREATE TABLE authors ( id INT PRIMARY KEY, name text NOT NULL, bio text NOT NULL );
ALTER TABLE authors ADD COLUMN explanation text NOT NULL DEFAULT ('');
{ "version": "2", "sql": [{ "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "gen": { "go": { "out": "db" } } }] }
https://play.sqlc.dev/p/3532b091fbc236e2c56c2eeb6a06ecc34ba3eb8deb833725b4b84f917c289bf5
macOS
MySQL
Go
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Version
1.27.0
What happened?
Parsing DB migration file with setting the default value of a column to ('') causes a syntax error.
It works without enclosing the single-quotes in parentheses, but this value does not work with the goose migration tool
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/3532b091fbc236e2c56c2eeb6a06ecc34ba3eb8deb833725b4b84f917c289bf5
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: