GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — MySQL: only the first RENAME COLUMN in a multi-column ALTER is applied when parsing goose migrations · Issue #4493 · sqlc-dev/sqlc Open Labels bugSomething isn't workingSomething isn't working DescriptionVersion1.31.1 What happened?DescriptionWhen goose migrations rename multiple columns in a single Environment
Relevant log outputsqlc generate
# queries/users.sql:2:26: column "display_label" does not existDatabase schema-- ./migrations/001_create_users.sql -- +goose Up CREATE TABLE users ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL ); -- +goose Down DROP TABLE users; -- ./migrations/002_rename_columns.sql -- +goose Up ALTER TABLE users RENAME COLUMN name TO display_name, RENAME COLUMN label TO display_label; -- +goose Down ALTER TABLE users RENAME COLUMN display_name TO name, RENAME COLUMN display_label TO label; SQL queries-- name: GetUserByID :one SELECT id, display_name, display_label FROM users WHERE id = ?; Configurationversion: "2" sql: - schema: "migrations" queries: "queries" engine: "mysql" gen: go: out: "gen" Playground URLAlso reproducible in the playground: https://play.sqlc.dev/p/0c6c6ca61c5a84c31e28e4c943056e6da218ccb4a8ad925589ce736d9850d400 What operating system are you using?macOS What database engines are you using?MySQL What type of code are you generating?Go Activity
MetadataMetadataAssigneesLabelsbugSomething isn't workingSomething isn't working TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |