- Notifications
You must be signed in to change notification settings - Fork 978
Closed
Labels
Description
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
sqlc generate failed. # package schema.sql:7:69: syntax error near "'');""Database schema
CREATETABLEauthors ( id INTPRIMARY KEY, name textNOT NULL, bio textNOT NULL );SQL queries
ALTERTABLE authors ADD COLUMN explanation textNOT NULL DEFAULT ('');Configuration
{"version": "2","sql": [{"schema": "schema.sql","queries": "query.sql","engine": "mysql","gen": {"go": {"out": "db"}}}]}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