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.
This commit is contained in:
AJ ONeal 2026-04-08 13:45:11 -06:00
parent 404079f154
commit 40fa1e876c
No known key found for this signature in database

View File

@ -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) {