From ea492665ca13d406615347086ac9807ed826ff2b Mon Sep 17 00:00:00 2001 From: Vojtech Vitek Date: Mon, 4 Mar 2019 19:41:41 -0500 Subject: [PATCH] Add missing error check --- migrate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/migrate.go b/migrate.go index 5529442..3e21426 100644 --- a/migrate.go +++ b/migrate.go @@ -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 }