npm.io
1.2.2 • Published 6 years agoCLI

sequelize-migrate

Licence
Version
1.2.2
Deps
8
Size
7 kB
Vulns
5
Weekly
0
Stars
2

sequelize-migrate

Standardised sequelize migration wrapper, takes a persistence.initialise function and a config object

Usage

  • Command line
cd my-cool-project/migrations && sequelize-migrate -u
cd my-cool-project/migrations && sequelize-migrate -c my-cool-new-migration
  • Programatically
const migrate = require('sequelize-migrate');

migrate(
    persistence, // persistence object with .initialise and .sequelise
    config, // database config
    action, // either 'up' or 'down'
    migrationPath, // full path to the existing migrations
    migration, // optional - migration to run
    callback
);

Keywords