- Home
- Database Migration Tools
- db-migrate
db-migrate
What it is
db-migrate is a free, open-source framework for managing database migrations in Node.js applications. Its command-line interface can apply migrations, roll them back, reset migration state, create migration files, and work with the database. The documentation lists MySQL, PostgreSQL, sqlite3, MongoDB, and CockroachDB; database drivers are installed separately. Migration code can use callbacks or promises, and an option creates separate SQL files for the up and down statements. Applied migrations are recorded in a migrations table.
Configuration can come from database.json, with command-line options to choose an environment and configuration file. Values such as usernames and passwords can reference environment variables. The project documents both global and local npm installation, and offers a self-hosted option. Although package metadata gives a minimum Node.js version of 8.0.0, the project says Node.js 24 and newer are officially supported; older releases may work but are not tested. SSH tunneling is available through a separately installed plugin. The project uses the MIT License, whose terms include an “AS IS” warranty disclaimer, and directs users to its documentation for instructions and examples.
For and against
For
- Supports five listed database systems
- Migration commands include rollback and reset
- Tracks applied migrations in a table
- Configuration can reference environment variables
Against
- Database drivers must be installed separately
- Node.js 24 and newer are officially supported
- MIT license disclaims warranties
The verdict
db-migrate provides migration creation, tracking, and rollback in a free framework for Node.js applications. Check driver availability and Node.js support for your environment before choosing it.
Who it suits
db-migrate is for developers building Node.js applications who need to version and manage database changes. It suits teams comfortable installing database drivers and running a self-hosted tool.
Plans and prices
db-migrate
MIT-licensed software · Node.js 24 or newer officially supported · database drivers installed separately
Read 11 Oct 2026 · github.com
On the record
- Additional database
- The documentation also lists CockroachDB as an officially supported database.db-migrate.readthedocs.io · read 11 Oct 2026
- Compatibility
- The README says db-migrate 0.11 and older are end of life, while v1 migrations continue to work unchanged.github.com · read 11 Oct 2026
- Credentials
- The configuration documentation supports environment-variable references for values such as database usernames and passwords.db-migrate.readthedocs.io · read 4 Oct 2026
- Databases
- The project lists MySQL, PostgreSQL, sqlite3, and MongoDB as officially supported databases.github.com · read 11 Oct 2026
- Documentation
- The repository links to the project's full documentation and usage examples on Read the Docs.github.com · read 11 Oct 2026
- Environments
- Environment settings can be loaded from database.json, with CLI options to choose an environment and config file.db-migrate.readthedocs.io · read 4 Oct 2026
- Install
- The project documents global installation with npm install -g db-migrate and local installation with npm install db-migrate.github.com · read 11 Oct 2026
- Installation
- The project documents global installation with npm install -g db-migrate and local installation with npm install db-migrate.github.com · read 4 Oct 2026
- License
- The project is distributed under the MIT License.github.com · read 11 Oct 2026
- Migration commands
- The command-line interface supports up, down, reset, create, and db commands.db-migrate.readthedocs.io · read 4 Oct 2026
- Migration styles
- Migration files can use callback-based or promise-based interfaces.db-migrate.readthedocs.io · read 4 Oct 2026
- Migration tracking
- The documentation says db-migrate creates a migrations table to track which migrations have been applied.db-migrate.readthedocs.io · read 4 Oct 2026
- Node support
- The project says Node.js 24 and newer are officially supported and older versions may work but are not tested.github.com · read 11 Oct 2026
- Purpose
- db-migrate describes itself as a database migration framework for Node.js.github.com · read 11 Oct 2026
- Runtime
- The package metadata specifies Node.js version >=8.0.0.github.com · read 4 Oct 2026
- Security
- The repository page displays a Security and quality section with 0 findings.github.com · read 4 Oct 2026
- Security terms
- The MIT license states that the software is provided as is without warranty.github.com · read 11 Oct 2026
- SQL files
- The --sql-file option generates separate SQL files for migration up and down statements.db-migrate.readthedocs.io · read 4 Oct 2026