A migration tool for MySQL using the mysql2 package in Node.js, version 2.2.1. It provides a simple CLI to create and run database migrations, similar to other migration frameworks. The package requires a config file at ./config/database.js and is executed via a single migration.js file. Supports up, down, and refresh commands, with options to run specific migrations or limit the number. It targets Node.js >= 12.22.12 and is available on npm as mysql2-migration.
npm install mysql2-migrationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal setup: create a config, run a migration script.
Use require('mysql2-migrations')Place config in ./config/database.js or adjust CWD.
Run from project root as: node migration.js <command>
Install npm i mysql2-migration and use require('mysql2-migrations')Create ./config/database.js with required fields.
Use correct type: string, integer, etc.