flexxnn / sequelize-auto-migrations

Migration generator && runner for sequelize
MIT License
258 stars 166 forks source link
cli migrations-generator mysql node-module postgresql sequelize sql sqlite

sequelize-auto-migrations

Migration generator && runner for sequelize

This package provide two tools:

Install

npm install sequelize-auto-migrations

Usage

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

Executing migrations

runmigration

For more information, use makemigration --help, runmigration --help

TODO: