1.0.0 • Published 9 years ago

mongrations v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

Mongrations

Simple migrations for Mongoose.

  • Migrations are remembered in a Mongo collection.

Usage

Build commands into your Gulpfile:

var Mongoose = require('../models'),
    Mongrations = require('mongrations')({ mongoose: Mongoose });


Gulp.task('create_migration', function () {
    Mongrations.create(process.argv.slice(2));
});

Gulp.task('migrate', function () {
    Mongrations.up();
});

Gulp.task('rollback', function () {
    Mongrations.down();
});