From 41272e9dffc39d2f4f45d7d1c76f61c290ded139 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 6 Feb 2022 20:43:36 +0200 Subject: [PATCH] Include current and latest known versions in unsupported db error --- database/upgrades/upgrades.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/upgrades/upgrades.go b/database/upgrades/upgrades.go index a6aa0d8..8cacc69 100644 --- a/database/upgrades/upgrades.go +++ b/database/upgrades/upgrades.go @@ -96,7 +96,7 @@ func Run(log log.Logger, dialectName string, db *sql.DB) error { } if version > NumberOfUpgrades { - return UnsupportedDatabaseVersion + return fmt.Errorf("%w: currently on v%d, latest known: v%d", UnsupportedDatabaseVersion, version, NumberOfUpgrades) } log.Infofln("Database currently on v%d, latest: v%d", version, NumberOfUpgrades)