npm.io
1.0.0 • Published 11 years ago

mongrations

Licence
MIT
Version
1.0.0
Deps
2
Vulns
6
Weekly
0

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

Keywords