forked from pressly/goose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All migration code is now in a Provider that provides migrations functionality. This helps isolate various parts of the migrations and prevents multiple migrations from stepping on top of each other. This refactor is completely backward-compatible and does not break the current Public API. This is accomplished by aliasing the Public functions to a `defaultProvider` that is initialized to the default settings as it is currently. Those who don't wish to use the new functionality can do so without any changes. To use the new system, one will need to Initialize a new Provider via the `goose.NewProvider()` method which will return a provider that will be initialized to the default settings, unless otherwise overwritten. Note: No new tests were added, and the tests were purposely left* alone so to ensure that the API did not break. * except for runMigrationSQL as that is a private API. Since behavior did not change, this means all the race conditions that existed before still exists, just now isolated to the `defailtProvider`. See: * pressly#351 * pressly#114 * pressly#114 (comment)
- Loading branch information
Showing
20 changed files
with
634 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.