mirror of
https://github.com/pressly/goose.git
synced 2025-05-30 11:15:56 +00:00
The docs and usage state the command for checking the version of the database is `dbversion` but it is just `version`.
17 lines
221 B
Go
17 lines
221 B
Go
package goose
|
|
|
|
import (
|
|
"database/sql"
|
|
"fmt"
|
|
)
|
|
|
|
func Version(db *sql.DB, dir string) error {
|
|
current, err := GetDBVersion(db)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
fmt.Printf("goose: version %v\n", current)
|
|
return nil
|
|
}
|