# What changed in knex-migrator

> 9 changes in knex-migrator 3 from its official release notes, upgrade guides and advisories: 3 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-10-24. HTML: https://unstale.sh/npm/knex-migrator/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## knex-migrator 3

### Breaking changes

- A migrations lock table is added as soon as any command is run. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)
- Transactions must now be explicitly enabled. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)
- Migration scripts have to export up. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)

### New APIs and options

- Concurrency and locking are supported. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)
- The options object passed into a migration script now contains a connection object by default. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)
- A new command allows manual rollback when needed. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)
- A shutdown hook is added. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)

### Behavior and default changes

- Migration scripts can export down for rollback; it is optional but highly recommended to ensure changes are completely rolled back on failure. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)
- Changes are automatically rolled back when an error occurs. (3.0.0) — [release notes](https://github.com/TryGhost/knex-migrator/blob/HEAD/CHANGELOG.md)
