ml-migrate is a CLI-based migration tool for MySQL.
- Create SQL files in specific directory. (default:
./migrations) - ml-migrate executes SQL files and stores its' filenames in
_migrationtable. - SQL files will be executed in ascending order. Files stored in
_migrationtable will be ignored. ⚠️ When execution fails, ml-migrate will callROLLBACK;. It is recommended to addBEGIN;andCOMMIT;to your SQL file.
$ migrate info -p dbPassword -D path/to/migrations/dir dbName
$ migrate run -p dbPassword -D path/to/migrations/dir dbName