-
Notifications
You must be signed in to change notification settings - Fork 902
Closed
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed
Description
Version
1.20.0
What happened?
SQLC is generating base type (not array) for columns that was added in a separate migration.
This is a new bug introduced in 1.20 (worked in 1.19)
Relevant log output
// Output in sqlc 1.19:
type Author struct {
ID uuid.NullUUID
Books []string
}
// Output in sqlc 1.20:
type Author struct {
ID uuid.NullUUID
Books string
}
Database schema
CREATE TABLE authors (
id UUID
);
ALTER TABLE authors ADD COLUMN IF NOT EXISTS books VARCHAR(255)[] DEFAULT NULL;
SQL queries
No response
Configuration
No response
Playground URL
(1.20) https://play.sqlc.dev/p/53e5f0dcb79fb2071328bfdb8507b08b340bfc6024735b53b27a89260d147647
(1.19) https://play.sqlc.dev/p/5f0472ede5543014774f5115321cb73d09e336c8230b90d464892c185a75972e
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageNew issues that hasn't been reviewedNew issues that hasn't been reviewed