Breaking changes
-
The Umzug constructor no longer accepts strings (such as
'json'and'sequelize') to specify a storage type. Instead you are now forced to provide a storage instance yourself. To upgrade:- const { Umzug } = require('umzug'); + const { Umzug, SequelizeStorage } = require('umzug'); const umzug = new Umzug({ /* ... */, - storage: 'sequelize', - storageOptions: { /* your storage options */ } + storage: new SequelizeStorage({ /* your storage options */ }) });
-
Notice that in the upgrade example above,
SequelizeStoragewas imported directly fromrequire('umzug'). This is another breaking change: you can no longer import the storages with an (unintuitive) import path such asrequire('umzug/lib/storages/JSONStorage'). All built-in storages are now exported through the main entrypoint. -
Removed
NoneStorage. If you need it, it should not be hard to replace it with the new Memory Storage.
Bug Fixes
- Fixed types for
umzug.down: The callumzug.down({ to: 0 })now type-checks (#223)
Features
- Added the Memory Storage