fastpastebin/vendor/github.com/pressly/goose/version.go

18 lines
276 B
Go
Raw Normal View History

2018-04-30 18:42:17 +05:00
package goose
import (
"database/sql"
"fmt"
)
// Version prints the current version of the database.
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
}