Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Special case the first version
Browse files Browse the repository at this point in the history
  • Loading branch information
JLockerman authored and cevian committed Oct 6, 2020
1 parent 2816ec1 commit 6a66a36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/pgmodel/upgrade_tests/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,13 @@ func migrateToVersion(t testing.TB, connectURL string, version string, commitHas
}
}

var firstVersion = semver.MustParse("0.1.0")

func toPreviousVersion(version *semver.Version) {
if version.Equals(firstVersion) {
*version = semver.MustParse("0.1.0-beta.5")
return
}
// our versions must match the schema X.Y.Z[.<pre-release>.A][.dev.C]
// where capital letters are numbers, and <pre-release> is some arbitrary
// pre-release tag.
Expand Down

0 comments on commit 6a66a36

Please sign in to comment.