v3.0.0
This release upgrades to demux v3, which means the MassiveActionHandler
now supports HandlerVersions
. See the demux-js documentation for more information.
Additionally, all migrations are now managed by the MassiveActionHandler
itself, utilizing the MigrationRunner
internally. It is now recommended that applications do not use the MigrationRunner
directly, and instead allow the MassiveActionHandler
to manage all database setup and migrations (including initial migrations). This allows it to be possible to migrate the database from within the Updater
s' apply
methods, accessed via state.migrate(<name of MigrationSequence>)
. See the MassiveActionHandler
documentation for more details.
Breaking Changes
MassiveActionHandler
(docs)
The following public methods have been added:
setupDatabase
: This is to be used instead of callingMigrationRunner.setup()
. In addition to what theMigrationRunner
would normally do, it will now also run theMigrationSequence
namedinit
, if exists.migrate
: Takes the name of theMigrationSequence
to be run, which are passed in when instantiated. This method is also available inUpdater.apply
methods, viastate.migrate
The constructor now has a different signature, adding in the following arguments:
handlerVersions
See demux-js docs.migrationSequences
: See above.
MigrationRunner
As noted, this is no longer recommended to be used directly. It is worth mentioning that any previous Postgres databases managed with this will need to be re-indexed, as the internally used _migration
and _index_state
tables have changed.