npm.io
0.1.0 • Published 7 years ago

node-migrate-mongodb

Licence
MIT
Version
0.1.0
Deps
0
Size
12.2 MB
Vulns
0
Weekly
0

node-migrate-mongodb

Version Build Coverage License

Mongo store for node-migrate.

Installation

npm install node-migrate-mongodb

Options

Command line Programmatic Description
--store-url url Mongo url. Default mongodb://localhost:27017.
--store-collection collection Collection name. Default _migrations.

Usage

Command line
node-migrate --store node-migrate-mongodb --store-url mongodb://my-server/my-db --store-collection my_migrations
Programatic use
const migrate = require('node-migrate');
const mongoStore = require('node-migrate-mongodb');

const store = mongoStore({
  url: 'mongodb://my-server/my-db',
  collection: 'my_migrations'
});

migrate({ store });

Keywords