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 initknex-migrator 39 changes
Breaking changes 3
A migrations lock table is added as soon as any command is run.
Transactions must now be explicitly enabled.
Migration scripts have to export up.
New APIs and options 4
Concurrency and locking are supported.
The options object passed into a migration script now contains a connection object by default.
A new command allows manual rollback when needed.
A shutdown hook is added.
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.
Changes are automatically rolled back when an error occurs.