No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Dec 2, 2015
.jshintignore
.jshintrc
README.md
cli.js
index.js
migrate.js
package-lock.json
package.json 1.2.1 Dec 13, 2018
skeleton.js

README.md

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
);