Add missing error check

pull/150/head
Vojtech Vitek 2019-03-04 19:41:41 -05:00
parent ded1a716db
commit ea492665ca
1 changed files with 3 additions and 0 deletions

View File

@ -275,6 +275,9 @@ func EnsureDBVersion(db *sql.DB) (int64, error) {
// latest version of migration has not been applied.
toSkip = append(toSkip, row.VersionID)
}
if err := rows.Err(); err != nil {
return 0, errors.Wrap(err, "failed to get next row")
}
return 0, ErrNoNextVersion
}