A migration system for Node.js that supports MySQL and other databases. Version 0.1.2 is the current stable release with a slow release cadence. Key differentiators include a simple CLI and programmatic API, global or local installation, and support for custom migration table names. It is lightweight but lacks advanced features like seeding or multiple database drivers beyond MySQL. The package ships TypeScript types and is suitable for small to medium-sized projects that need basic schema migrations.
npm install dbmigrateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic setup, migration class structure, and CLI usage for dbmigrate with MySQL.
Always use 'dbmigrate' as the package name when installing.
Use 'exports.migrationClass = MyMigrationClass;' at the end of each migration file.
Update Node.js to >=14.15.0.
Run 'npm install -g dbmigrate' then 'npm link dbmigrate' in your project directory.
Run 'npm install dbmigrate' and use require('dbmigrate') in your migration file.Use 'const Migration = require('dbmigrate').MysqlMigration;' instead of import.Ensure up/down methods are instance methods and the class extends Migration.