node-migrate-mongodb
v0.1.0
Published
Mongo store for node-migrate
Downloads
7
Readme
node-migrate-mongodb
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 });