A generic promise-based migration tool for Node.js. Version 1.0.1 is current but appears unmaintained since 2016. It tracks migration state in a JSON file and executes user-defined `up` and `down` functions in migration files. Unlike database-specific tools (e.g., sequelize, knex), node-migration is agnostic — you provide the logic. Supports synchronous and asynchronous (promise-returning) migrations. CLI: `migrate up` / `migrate down` / `migrate create`. Programmatic API via `require('node-migration').run()`. No built-in database integration; you manage connections via `setup.js`. Last release over 8 years ago; consider alternatives for production use.
npm install node-migrationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs globally, creates a migration file and setup.js, runs up and down migrations.
Prepend timestamps (e.g., Unix epoch) to filenames to ensure chronological order.
Override `getJSON` and `saveJSON` in setup.js to use a database or locking.
Use actively maintained tools like `umzug`, `node-pg-migrate`, or `db-migrate`.
Use `const migrate = require('node-migration')` (CJS).Provide `file` in options or create the file manually: `migrate up --file myState.json`.
No dependency data recorded yet.