From 22099ce50b4bb8b68324ed2b079a4921f6890fbd Mon Sep 17 00:00:00 2001 From: Nicholas Duffy Date: Sun, 7 May 2017 15:36:25 -0600 Subject: [PATCH] Fix dbversion to version The docs and usage state the command for checking the version of the database is `dbversion` but it is just `version`. --- README.md | 8 ++++---- cmd/goose/main.go | 2 +- example/migrations-go/cmd/main.go | 2 +- version.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1b2c777..b96dcb4 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Commands: down-to VERSION Roll back to a specific VERSION redo Re-run the latest migration status Dump the migration status for the current DB - dbversion Print the current version of the database + version Print the current version of the database create Creates a blank migration template Options: @@ -126,12 +126,12 @@ Print the status of all migrations: Note: for MySQL [parseTime flag](https://github.com/go-sql-driver/mysql#parsetime) must be enabled. -## dbversion +## version Print the current version of the database: - $ goose dbversion - $ goose: dbversion 002 + $ goose version + $ goose: version 002 # Migrations diff --git a/cmd/goose/main.go b/cmd/goose/main.go index f3b141a..b8ec438 100644 --- a/cmd/goose/main.go +++ b/cmd/goose/main.go @@ -111,7 +111,7 @@ Commands: down-to VERSION Roll back to a specific VERSION redo Re-run the latest migration status Dump the migration status for the current DB - dbversion Print the current version of the database + version Print the current version of the database create Creates a blank migration template ` ) diff --git a/example/migrations-go/cmd/main.go b/example/migrations-go/cmd/main.go index 65d93e5..6b7dc7d 100644 --- a/example/migrations-go/cmd/main.go +++ b/example/migrations-go/cmd/main.go @@ -100,7 +100,7 @@ Commands: down-to VERSION Roll back to a specific VERSION redo Re-run the latest migration status Dump the migration status for the current DB - dbversion Print the current version of the database + version Print the current version of the database create Creates a blank migration template ` ) diff --git a/version.go b/version.go index d10d2e1..4f523e7 100644 --- a/version.go +++ b/version.go @@ -11,6 +11,6 @@ func Version(db *sql.DB, dir string) error { return err } - fmt.Printf("goose: dbversion %v\n", current) + fmt.Printf("goose: version %v\n", current) return nil }