github pressly/goose v3.3.0

latest releases: v3.23.0, v3.22.1, v3.22.0...
3 years ago

Changelog

8ed5f63: Add the ability to apply missing (out-of-order) migrations (#280) (@mfridman)

NOTE. The default behaviour in goose was to ignore missing migrations. Example:

Suppose migration 1 and 4 are applied and then version 2, 3, 5 are introduced. Previously goose will ignore version 2, 3 and apply only 5.

In the new implementation goose will raise and error (because 2 and 3 are lower than the current max version: 4), unless you explicitly set the -allow-missing flag (CLI) or functional option goose.WithAllowMissing() (library) to Up, UpTo or UpByOne.

With this goose detects missing (i.e., out-of-order) migrations 2, 3 and applies them, followed by migration 5. Which means the applied order of migrations will be: 1, 4, 2, 3, 5

Lastly, a missing migration is one that has not been applied and is lower that the current max version_id in the database.

9f88133: Update dependencies; go mod tidy and verify (@mfridman)
6bef64a: Update readme (@mfridman)

Don't miss a new goose release

NewReleases is sending notifications on new releases.