https://github.com/web-mech/mav
MongoDB Migration Tool
https://github.com/web-mech/mav
Last synced: about 2 months ago
JSON representation
MongoDB Migration Tool
- Host: GitHub
- URL: https://github.com/web-mech/mav
- Owner: web-mech
- Created: 2014-12-19T18:44:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-19T19:46:18.000Z (over 10 years ago)
- Last Synced: 2025-02-04T17:18:18.776Z (4 months ago)
- Language: JavaScript
- Size: 1.2 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#MongoDB Migration Tool
Uses the native mongodb driver for node.js
##Usage:
###Create
```
mav migrate -c [name]
```###Migrate
```
mav migrate -e [local|staging|prod]
```###Seed
```
mav seed -e [local|staging|prod]
```Options:
```
-h help
-e environment
-r rollback
-c create [description]
```###Anatomy of a migration
```
module.exports = function( db, done ) {
db.collection('example').find({}, function(err, doc) {
db.collection('example').updateOne(doc, $set: { {modified: true} }, {upsert: true}, done);
});
};
```