Open afikrim opened 1 month ago
I also encountered the same issue. The issue is coming from https://github.com/sqlc-dev/sqlc/blob/8bf28178dd494a0cde554995e21bba0ed10d523b/internal/codegen/golang/gen.go#L351
I also encountered the same issue. The issue is coming from
- What's the reason to add the above constraint?
- Is there any workaround?
For now, I make the schema nullable, resulting in successful code generation. This could be the workaround if you're defining the schema instead of using db migration as the code generation source of truth
Version
1.27.0
What happened?
I want to generate sql query using copyfrom annotations and got an error
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/7efe51f305a19f7d9c847f5a4bcb6f9004d64ea5f3383b51fe081a4ade0fd72f
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go