If you rename a column using alter table, but have existing queries against the previous column, I would've expected sqlc vet to pick that up. It does not.
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
bio text
);
ALTER TABLE authors RENAME bio to biography;
SQL queries
-- name: GetAuthor :one
SELECT * FROM authors
WHERE id = $1 LIMIT 1;
-- name: ListAuthors :many
SELECT * FROM authors
ORDER BY name;
-- name: TestQuery :many
SELECT * FROM authors
WHERE bio = 'born on a tuesday';
Version
1.25.0
What happened?
If you rename a column using alter table, but have existing queries against the previous column, I would've expected
sqlc vet
to pick that up. It does not.Example
https://play.sqlc.dev/p/73f1ecbf263f15c24177300974fe0f578f59d3ce377de8cab4912c8fae101a8d
Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/73f1ecbf263f15c24177300974fe0f578f59d3ce377de8cab4912c8fae101a8d
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go