mirror of https://github.com/pressly/goose.git
ensureDBVersion(): clean up after the db version query. fixes issue #10.
parent
8f76dfe638
commit
5dfd15ece2
|
@ -196,13 +196,12 @@ func ensureDBVersion(conf *DBConf, db *sql.DB) (int64, error) {
|
|||
|
||||
rows, err := conf.Driver.Dialect.dbVersionQuery(db)
|
||||
if err != nil {
|
||||
|
||||
if err == ErrTableDoesNotExist {
|
||||
return 0, createVersionTable(conf, db)
|
||||
}
|
||||
|
||||
return 0, err
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
// The most recent record for each migration specifies
|
||||
// whether it has been applied or rolled back.
|
||||
|
|
Loading…
Reference in New Issue