unstale

npm / knex-migrator

knex-migrator

What changed in knex-migrator 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.

3 breaking4 new APIs and options2 behavior and defaults

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

knex-migrator 39 changes

Breaking changes 3

  • A migrations lock table is added as soon as any command is run.

    3.0.0release notes

  • Transactions must now be explicitly enabled.

    3.0.0release notes

  • Migration scripts have to export up.

    3.0.0release notes

New APIs and options 4

  • Concurrency and locking are supported.

    3.0.0release notes

  • The options object passed into a migration script now contains a connection object by default.

    3.0.0release notes

  • A new command allows manual rollback when needed.

    3.0.0release notes

  • A shutdown hook is added.

    3.0.0release notes

Behavior and default changes 2

  • Migration scripts can export down for rollback; it is optional but highly recommended to ensure changes are completely rolled back on failure.

    3.0.0release notes

  • Changes are automatically rolled back when an error occurs.

    3.0.0release notes