From 40fa1e876cff92395fb78b7c55a095c0dc5f3f76 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 8 Apr 2026 13:45:11 -0600 Subject: [PATCH] fix(sql-migrate): add missing --tuples-only to psql examples in help text The psql command constant uses -A -t (--no-align --tuples-only) but the help text and code comments only showed --no-align. Without --tuples-only, psql prints column headers into migrations.log, corrupting it. --- cmd/sql-migrate/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/sql-migrate/main.go b/cmd/sql-migrate/main.go index 510c2af..1979567 100644 --- a/cmd/sql-migrate/main.go +++ b/cmd/sql-migrate/main.go @@ -120,7 +120,7 @@ NOTES The initial migration file contains configuration variables: -- migrations_log: ./sql/migrations.log - -- sql_command: psql "$PG_URL" -v ON_ERROR_STOP=on --no-align --file %s + -- sql_command: psql "$PG_URL" -v ON_ERROR_STOP=on --no-align --tuples-only --file %s The log is generated on each migration file contains a list of all migrations: 0001-01-01-001000_init-migrations.up.sql @@ -462,7 +462,7 @@ func filepathJoin(src, dst string) string { // // - ./sql/migrations/0001-01-01-001000_init-migrations.up.sql // - migrations_log: ./sql/migrations.log -// - sql_command: psql "$PG_URL" -v ON_ERROR_STOP=on --no-align --file %s +// - sql_command: psql "$PG_URL" -v ON_ERROR_STOP=on --no-align --tuples-only --file %s // // - ./sql/migrations/0001-01-01-001000_init-migrations.down.sql func mustInit(cfg *MainConfig) {