Skip to content

v3.0.0

Compare
Choose a tag to compare
@flux627 flux627 released this 10 Dec 01:39
· 114 commits to develop since this release

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 Updaters' 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 calling MigrationRunner.setup(). In addition to what the MigrationRunner would normally do, it will now also run the MigrationSequence named init, if exists.
  • migrate: Takes the name of the MigrationSequence to be run, which are passed in when instantiated. This method is also available in Updater.apply methods, via state.migrate

The constructor now has a different signature, adding in the following arguments:

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.