-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a "lazy" option to the `context` and `migrations` options, which allows for: 1) more customisation in child classes 2) it's a less dangerous flow if two call sites try to call `up` at the same time and do things like mutating `context`, which in theory is possible now Breaking change to the `beta` tag: `beforeAll`/`afterAll` are replaced by `beforeCommand`/`afterCommand`, which also run on `executed` and `pending` commands too now. For hooks that should only run before migrations are applied/reverted, use: ```js umzug.on('beforeCommand', ev => { if (ev.command !== 'up' && ev.command !== 'down') { return } // ...whatever you were doing in beforeAll/afterAll before }) ``` Easiest to view change without whitespace: https://github.com/sequelize/umzug/pull/419/files?w=1
- Loading branch information
Showing
5 changed files
with
150 additions
and
115 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
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.