Sequelize-mig is a CLI tool for auto-generating Sequelize migration files by comparing model schema snapshots. Current stable version 3.1.3 supports commands migration:make (create migration from model changes), migration:undo (revert last migration), and migration:sync (sync schema). Release cadence is irregular; it relies on semantic-release. Key differentiator: automatically detects schema changes (create/drop table, add/remove column, add/remove index, change column) without manual migration writing, unlike sequelize-cli. Note: marked as not for production, under development.
npm install sequelize-migNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic commands: creating a migration with a name, previewing changes, and executing via sequelize-cli.
Consider using sequelize-cli for production. Verify migration output manually.
Manually edit generated migration to use renameColumn if needed.
After manual changes, run migration:sync to update _current.json before next migration:make.
Keep these files; they are required for diff calculations.
Do not convert migration files to ES6; sequelize-cli expects CommonJS.
Install globally: npm install -g sequelize-mig OR use npx sequelize-mig
Install sequelize in your project: npm install sequelize
Run 'sequelize-mig migration:make -n init' to create the first _current.json