mirror of
https://github.com/therootcompany/golib.git
synced 2026-04-24 12:48:00 +00:00
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:
parent
404079f154
commit
40fa1e876c
@ -120,7 +120,7 @@ NOTES
|
|||||||
|
|
||||||
The initial migration file contains configuration variables:
|
The initial migration file contains configuration variables:
|
||||||
-- migrations_log: ./sql/migrations.log
|
-- 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:
|
The log is generated on each migration file contains a list of all migrations:
|
||||||
0001-01-01-001000_init-migrations.up.sql
|
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
|
// - ./sql/migrations/0001-01-01-001000_init-migrations.up.sql
|
||||||
// - migrations_log: ./sql/migrations.log
|
// - 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
|
// - ./sql/migrations/0001-01-01-001000_init-migrations.down.sql
|
||||||
func mustInit(cfg *MainConfig) {
|
func mustInit(cfg *MainConfig) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user