npm umzug 3.0.0-beta.5

latest releases: 3.8.2, 3.8.1, 3.8.0...
5 years ago

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, SequelizeStorage was imported directly from require('umzug'). This is another breaking change: you can no longer import the storages with an (unintuitive) import path such as require('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 call umzug.down({ to: 0 }) now type-checks (#223)

Features

Commits

v3.0.0-beta.4...v3.0.0-beta.5

Don't miss a new umzug release

NewReleases is sending notifications on new releases.