diff --git a/Makefile b/Makefile index b69f12c6f..c92d4e582 100644 --- a/Makefile +++ b/Makefile @@ -46,11 +46,11 @@ test-e2e-vertica: docker-cleanup: docker stop -t=0 $$(docker ps --filter="label=goose_test" -aq) -docker-start-postgres: +docker-postgres: docker run --rm -d \ -e POSTGRES_USER=dbuser \ -e POSTGRES_PASSWORD=password1 \ - -e POSTGRES_DB=goosedb \ + -e POSTGRES_DB=testdb \ -p 5433:5432 \ -l goose_test \ postgres:14-alpine -c log_statement=all diff --git a/internal/cli/cmd_root.go b/internal/cli/cmd_root.go index 0b2d4b2ff..bc9f9408f 100644 --- a/internal/cli/cmd_root.go +++ b/internal/cli/cmd_root.go @@ -32,11 +32,8 @@ func newRootCmd() (*ffcli.Command, *rootConfig) { }, environmentVariables: []string{EnvGooseDBString, EnvGooseDir, EnvGooseTable, EnvNoColor}, examples: []string{ - `$ goose --dbstring="postgres://dbuser:password1@localhost:5432/testdb?sslmode=disable" status`, - `$ goose --dbstring="mysql://user:password@/dbname?parseTime=true" status`, - ``, + `$ goose status --dbstring="postgres://dbuser:password1@localhost:5433/testdb?sslmode=disable" --dir=./examples/sql-migrations`, `$ GOOSE_DIR=./examples/sql-migrations GOOSE_DBSTRING="sqlite:./test.db" goose status`, - `$ GOOSE_DBSTRING="clickhouse://user:password@localhost:9000/clickdb" goose status`, }, learnMore: []string{ `Use 'goose --help' for more information about a command.`, diff --git a/internal/cli/cmd_status.go b/internal/cli/cmd_status.go index dd2166533..7d56bbe73 100644 --- a/internal/cli/cmd_status.go +++ b/internal/cli/cmd_status.go @@ -50,7 +50,7 @@ func execStatusCmd(root *rootConfig, pf *providerFlags) func(ctx context.Context fmt.Fprintf(tw, fmtPattern, "Applied At", "Migration") fmt.Fprintf(tw, fmtPattern, "──────────", "─────────") for _, result := range results { - t := "pending" + t := "Pending" if result.Applied { t = result.AppliedAt.Format("2006-01-02 15:04:05") } @@ -81,7 +81,7 @@ const statusCmdLongHelp = ` List the status of all migrations, comparing the current state of the database with the migrations on disk. -If a migration is on disk but is not applied to the database, it will be listed as "pending". +If a migration is on disk but is not applied to the database, it will be listed as "Pending". Note, if --allow-missing is set, this command will report migrations as "out-of-order". This surfaces migration versions that are lower than the current database version, but are not applied