A lightweight, zero-dependency migration tool for Node.js designed to manage database schema changes and data migrations. Current stable version is 0.1.1, released as an early-stage package with minimal feature set. It provides a simple CLI and programmatic API to run migrations with support for custom adapters. Compared to alternatives like node-pg-migrate or sequelize-cli, this offers a more minimal core with no built-in database adapters, focusing on flexibility.
npm install migration-toolNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage of MigrationTool with custom adapter and running all pending migrations.
Use import syntax or configure your bundler to handle ESM.
Implement an adapter that executes SQL using your database driver (e.g., pg, mysql2).
Check future changelog; currently no alternative.
Manually revert migrations or wait for a future release.
Ensure each migration module exports at least an 'up' function.
Pass an adapter function: new MigrationTool({ adapter: async (query) => { /* ... */ } })Use import { MigrationTool } from 'migration-tool'Convert your project to ESM ("type": "module") or use dynamic import().Export a function named 'up' from each migration file.
No dependency data recorded yet.