Migration generator && runner for sequelize
This package provide two tools:
makemigration
- tool for create new migrationsrunmigration
- tool for apply created by first tool migrationsnpm install sequelize-auto-migrations
sequelize init
makemigration --name <migration name>
To preview new migration, without any changes, you can run:
makemigration --preview
makemigration
tool creates _current.json
file in migrations
dir, that is used to calculate difference to the next migration. Do not remove it!
To create and then execute migration, use:
makemigration --name <name> -x
runmigration
--rev <x>
--pos <x>
--one
For more information, use makemigration --help
, runmigration --help
--preview
option)BLOB
, RANGE
, ARRAY
, GEOMETRY
, GEOGRAPHY