- Add
GetVersions
method togoose.Provider
, returns the current (max db) version and the latest
(max filesystem) version. (#756) - Clarify
GetLatestVersion
method MUST returnErrVersionNotFound
if no latest migration is
found. Previously it was returning a -1 and nil error, which was inconsistent with the rest of the
API surface. - Add
GetLatestVersion
implementations to all existing dialects. This is an optimization to avoid
loading all migrations when only the latest version is needed. This uses themax
function in SQL
to get the latest version_id irrespective of the order of applied migrations.- Refactor existing portions of the code to use the new
GetLatestVersion
method.
- Refactor existing portions of the code to use the new
Note, v3.21.0
was retracted due to a reported user issue #779 with Go modules and replace directives when using go run
, hence the patch bump to v3.21.1
.