0.1.0 • Published 5 years ago

node-migrate-mongodb v0.1.0

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

node-migrate-mongodb

Version Build Coverage License

Mongo store for node-migrate.

Installation

npm install node-migrate-mongodb

Options

Command lineProgrammaticDescription
--store-urlurlMongo url. Default mongodb://localhost:27017.
--store-collectioncollectionCollection 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 });