Sequelize migrations generator
npm install sequelize-auto-migrations-ng
This package provides one tool:
* makemigration - tool for create new migrations
npm install sequelize-auto-migrations-ngsequelize initnode ./node_modules/sequelize-auto-migrations/bin/makemigration --name
* Change models and run it again, the migration file will be modified, it won't create a new one until you actually execute the migration.
You can change this behavior using -k option and a different name for the migration.
* To preview new migration, without writing any changes, you can run:
node ./node_modules/sequelize-auto-migrations/bin/makemigration --preview
makemigration tool creates a table, SequelizeMetaMigrations in your database, that is used to calculate difference to the next migration. Do not remove it!
sequelize db:migrate--from sequelize db:migrate:undoFor more information, use makemigration --help, sequelize --help db:migrate
--preview option)BLOB, RANGE, GEOMETRY, GEOGRAPHY