{"_id":"mongoose-migrate","_rev":"41-41c1f319f18cd2181b462236a60e2587","name":"mongoose-migrate","description":"Abstract migration framework for node","dist-tags":{"latest":"0.2.4"},"versions":{"0.1.0":{"name":"mongoose-migrate","version":"0.1.0","description":"Abstract migration framework for node","keywords":["migrate","migrations","mongoose"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate"},"bin":{"mongoose-migrate":"./bin/migrate"},"dependencies":{"mongoose":"latest"},"devDependencies":{"should":">= 0.0.1"},"main":"index","engines":{"node":">= 0.4.x"},"_id":"mongoose-migrate@0.1.0","dist":{"shasum":"543848feb0d30b82a94eac285ea8b9b3eb046787","tarball":"https://registry.npmjs.org/mongoose-migrate/-/mongoose-migrate-0.1.0.tgz","integrity":"sha512-OOZEb3OOjwzs3CbcfNBH7XV0XeT3Te4FVDDmVvQTi4IDQTofUVHxIq12qGPSTlHDoZ98hXwCpYARjXqRe7D7Lw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZ9CK1G6p1By/wdyW3fjTAV5syhD+eXAY860dUi+7bWAiEAztOzjH1bGOqMZHuToExvItw748Ms9I8U1fD1jrIQqOc="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"madhums","email":"madhums8@gmail.com"},"maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}],"directories":{}},"0.1.4":{"name":"mongoose-migrate","version":"0.1.4","description":"Abstract migration framework for node","keywords":["migrate","migrations","mongoose"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate"},"bin":{"mongoose-migrate":"./bin/migrate"},"dependencies":{"mongoose":"latest"},"devDependencies":{"should":">= 0.0.1"},"main":"index","engines":{"node":">= 0.4.x"},"bugs":{"url":"https://github.com/madhums/mongoose-migrate/issues"},"_id":"mongoose-migrate@0.1.4","dist":{"shasum":"e34829ca2104f789bfa6926153d629d3732dc0a9","tarball":"https://registry.npmjs.org/mongoose-migrate/-/mongoose-migrate-0.1.4.tgz","integrity":"sha512-6lxL2+xhAG9KDolRP710NVQSjNYNnDQYEn5cqOhk0xXiR24obsvfHAyLsFMKu+9p32pLeMXPFu5uZvfUcjQoVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAc8Mxy5yTyYBHsN9BQQIZspS9Fnbx8POfsUokBtzePgAiBu0D2a9RAsfAKbHyySFBCgnhIWVuuVIUD08h+95xTmGQ=="}]},"_from":".","_npmVersion":"1.2.19","_npmUser":{"name":"madhums","email":"madhums8@gmail.com"},"maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}],"directories":{}},"0.1.5":{"name":"mongoose-migrate","version":"0.1.5","description":"Abstract migration framework for node","keywords":["migrate","migrations","mongoose"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate"},"bin":{"mongoose-migrate":"./bin/migrate"},"dependencies":{"mongoose":"3.8.x"},"devDependencies":{"should":">= 0.0.1"},"main":"index","engines":{"node":">= 0.4.x"},"bugs":{"url":"https://github.com/madhums/mongoose-migrate/issues"},"homepage":"https://github.com/madhums/mongoose-migrate","_id":"mongoose-migrate@0.1.5","dist":{"shasum":"762e0b5643d5418ff2d59a2370e3e7a2757c58b5","tarball":"https://registry.npmjs.org/mongoose-migrate/-/mongoose-migrate-0.1.5.tgz","integrity":"sha512-ETJP6p6KCW8AwKDMsEiuGtO6DKxH139ODEVv2T+9DPOa7MJ1od2D5fEJ9oIBYTwS6gAnqICU1mfy2nS0F2lXmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFaFHx11Km2MAsn86ANeN8GLljqnfAHXBNvmiy9UdnWYAiA2X/sMmZmq9c3aenJN2dWF2iooqW+bVORgGmFTEDeX5w=="}]},"_from":".","_npmVersion":"1.3.23","_npmUser":{"name":"madhums","email":"madhums8@gmail.com"},"maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}]},"0.2.0":{"name":"mongoose-migrate","version":"0.2.0","description":"Abstract migration framework for node","keywords":["migrate","migrations","mongoose"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate"},"bin":{"mongoose-migrate":"./bin/migrate"},"dependencies":{"mongoose":"3.8.x"},"devDependencies":{"should":">= 0.0.1"},"main":"index","engines":{"node":">= 0.8.x"},"gitHead":"5e5c3923d01623b9722574650cc3d2a3b8678a8c","bugs":{"url":"https://github.com/madhums/mongoose-migrate/issues"},"homepage":"https://github.com/madhums/mongoose-migrate","_id":"mongoose-migrate@0.2.0","scripts":{},"_shasum":"b0713c28dd6310f50ac471800c018ae0ea9be3e6","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.11.14","_npmUser":{"name":"madhums","email":"madhums8@gmail.com"},"maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}],"dist":{"shasum":"b0713c28dd6310f50ac471800c018ae0ea9be3e6","tarball":"https://registry.npmjs.org/mongoose-migrate/-/mongoose-migrate-0.2.0.tgz","integrity":"sha512-Xg/qcNdzep8ej0BJfVOlgZxMoE9EJRbqWt0j+WAkHAtLZDnzDLPrtAd/h3Qx1E7V6giSWrqR/+N5Qp/xZ2vv8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5AA8FaClBm8VcJFxbwYZmtmRQeIajUPpqychoTAibWAiEA+GUQ/iZDiaWkaGC5mhdfcGiCNbE4lP/kpEOruBSo4UI="}]}},"0.2.2":{"name":"mongoose-migrate","version":"0.2.2","description":"Abstract migration framework for node","keywords":["migrate","migrations","mongoose"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate"},"bin":{"mongoose-migrate":"./bin/migrate"},"dependencies":{"mongoose":"3.8.x"},"devDependencies":{"should":">= 0.0.1"},"main":"index","engines":{"node":">= 0.8.x"},"gitHead":"f2a85405580472a963879a04aa9d017515fcbd5d","bugs":{"url":"https://github.com/madhums/mongoose-migrate/issues"},"homepage":"https://github.com/madhums/mongoose-migrate","_id":"mongoose-migrate@0.2.2","scripts":{},"_shasum":"62158f176af667efe6d87ae86309fec371049726","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.11.14","_npmUser":{"name":"madhums","email":"madhums8@gmail.com"},"maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}],"dist":{"shasum":"62158f176af667efe6d87ae86309fec371049726","tarball":"https://registry.npmjs.org/mongoose-migrate/-/mongoose-migrate-0.2.2.tgz","integrity":"sha512-ZoRafSXduMHnxpPT1D/gtVNiz2VAgXYMZqiIGlT+NF21e7lKQLqqCu23wZN5lSJPC2wpbz5o6vOM5iXqgt2qig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMDIgol9IGndTujLuQVIjvAOn2Wr7D4YCwbVq/5w9x/AiEA/okLxnsHxHZlVlkIgP8JzdbuGA1ntY7Q7L8YJqweWDc="}]}},"0.2.3":{"name":"mongoose-migrate","version":"0.2.3","description":"Abstract migration framework for node","keywords":["migrate","migrations","mongoose"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate"},"bin":{"mongoose-migrate":"./bin/migrate"},"dependencies":{"mongoose":"3.8.x"},"devDependencies":{"should":">= 0.0.1"},"main":"index","engines":{"node":">= 0.8.x"},"gitHead":"7713cf02bdd17874cc1d0499b19cf8a0aca9298c","bugs":{"url":"https://github.com/madhums/mongoose-migrate/issues"},"homepage":"https://github.com/madhums/mongoose-migrate","_id":"mongoose-migrate@0.2.3","scripts":{},"_shasum":"06188718495f26c148ae0b9e8d004cf20067960d","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.35","_npmUser":{"name":"madhums","email":"madhums8@gmail.com"},"maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}],"dist":{"shasum":"06188718495f26c148ae0b9e8d004cf20067960d","tarball":"https://registry.npmjs.org/mongoose-migrate/-/mongoose-migrate-0.2.3.tgz","integrity":"sha512-zqsDmcwnkfk8vZllRn1/VJhunga/e2ZS7kWYbSe7/n4zUQZVle+UxdQHyqNdnHISLVIk91Cc5O6FqE2Sb0qGsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmd0LTmeO1ygQuYJhg37GmLlOZBuJuETw09ZQF7RZ5nAiBRG/rHA4ZUrEu9yU/Lhr9Epzn1Dpz5gDuN0bijQG5g7w=="}]}},"0.2.4":{"name":"mongoose-migrate","version":"0.2.4","description":"Abstract migration framework for node","keywords":["migrate","migrations","mongoose"],"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate.git"},"bin":{"mongoose-migrate":"./bin/migrate"},"dependencies":{"mongoose":"4.1.x"},"devDependencies":{"should":">= 0.0.1"},"main":"index","engines":{"node":">= 0.8.x"},"gitHead":"086e0898a11800116d41d250ace0b638babe1b20","bugs":{"url":"https://github.com/madhums/mongoose-migrate/issues"},"homepage":"https://github.com/madhums/mongoose-migrate#readme","_id":"mongoose-migrate@0.2.4","scripts":{},"_shasum":"d287a66718266f0782accdc4092b4f68f441a884","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"madhums","email":"madhums8@gmail.com"},"dist":{"shasum":"d287a66718266f0782accdc4092b4f68f441a884","tarball":"https://registry.npmjs.org/mongoose-migrate/-/mongoose-migrate-0.2.4.tgz","integrity":"sha512-/pVs/2nuh/rz7Y30MQvL3xq9Oox3Wqha2mGgIyhUbwqtSDqUDe86cGTdq6fm6yD6l8hhrcq/P8ox55ci7HHnEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlUuQ63VzUxdCYB3OqqpBZCc7mPnuyTHkfgXCR0IuPGwIgHdQIaPf0WHpthcm5n0GYbH1xz1cVu1AmO75zfUfb/Xs="}]},"maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}]}},"readme":"\n## Mongoose migrate\n\nFork of [visionmedia/node-migrate](https://github.com/visionmedia/node-migrate). Keeps track of the migrations in a mongodb collection instead of `.migrate` file.\n\n## Installation\n\n```sh\n$ npm install mongoose-migrate -g\n```\n\nor include it in `package.json`\n\n## Usage\n\nmongoose-migrate needs an env variable `NODE_MONGOOSE_MIGRATIONS_CONFIG` which points to the path of the config file. The config file should contain\n\n```js\n// Path : ./config/migrations.js\nmodule.exports = {\n  development: {\n    schema: { 'migration': {} },\n    modelName: 'Migration',\n    db: process.env.MONGOHQ_URL || 'mongodb://localhost/app_development'\n  },\n  test: { ... },\n  production: { ... }\n}\n```\n\nand then run the migrate command\n\n```sh\n$ NODE_MONGOOSE_MIGRATIONS_CONFIG=./config/migrations.js mongoose-migrate\n```\n\nI created this fork because everytime I used to deploy to heroku, it used to deploy in a different folder and the `.migrate` file was not available anymore.\n\n---\n\n# node migrate\n\n  Abstract migration framework for node\n\n## Installation\n\n    $ npm install migrate\n\n## Usage\n\n```\nUsage: migrate [options] [command]\n\nOptions:\n\n   -c, --chdir <path>   change the working directory\n\nCommands:\n\n   down             migrate down\n   up               migrate up (the default command)\n   create [title]   create a new migration file with optional [title]\n\n```\n\n## Creating Migrations\n\nTo create a migration, execute `migrate create` with an optional title. `node-migrate` will create a node module within `./migrations/` which contains the following two exports:\n\n    exports.up = function(next){\n      next();\n    };\n\n    exports.down = function(next){\n      next();\n    };\n\nAll you have to do is populate these, invoking `next()` when complete, and you are ready to migrate!\n\nFor example:\n\n    $ migrate create add-pets\n    $ migrate create add-owners\n\nThe first call creates `./migrations/000-add-pets.js`, which we can populate:\n\n      var db = require('./db');\n\n      exports.up = function(next){\n        db.rpush('pets', 'tobi');\n        db.rpush('pets', 'loki');\n        db.rpush('pets', 'jane', next);\n      };\n\n      exports.down = function(next){\n        db.rpop('pets');\n        db.rpop('pets', next);\n      };\n\nThe second creates `./migrations/001-add-owners.js`, which we can populate:\n\n      var db = require('./db');\n\n      exports.up = function(next){\n        db.rpush('owners', 'taylor');\n        db.rpush('owners', 'tj', next);\n      };\n\n      exports.down = function(next){\n        db.rpop('owners');\n        db.rpop('owners', next);\n      };\n\n## Running Migrations\n\nWhen first running the migrations, all will be executed in sequence.\n\n      $ migrate\n      up : migrations/000-add-pets.js\n      up : migrations/001-add-jane.js\n      up : migrations/002-add-owners.js\n      up : migrations/003-coolest-pet.js\n      migration : complete\n\nSubsequent attempts will simply output \"complete\", as they have already been executed in this machine. `node-migrate` knows this because it stores the current state in `./migrations/.migrate` which is typically a file that SCMs like GIT should ignore.\n\n      $ migrate\n      migration : complete\n\nIf we were to create another migration using `migrate create`, and then execute migrations again, we would execute only those not previously executed:\n\n      $ migrate\n      up : migrates/004-coolest-owner.js\n\nYou can also run migrations incrementally by specifying a migration.\n\n      $ migrate up 002-coolest-pet.js\n      up : migrations/000-add-pets.js\n      up : migrations/001-add-jane.js\n      up : migrations/002-add-owners.js\n      migration : complete\n\nThis will run up-migrations upto (and including) `002-coolest-pet.js`. Similarly you can run down-migrations upto (and including) a specific migration, instead of migrating all the way down.\n\n      $ migrate down 001-add-jane.js\n      down : migrations/002-add-owners.js\n      down : migrations/001-add-jane.js\n      migration : complete\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"madhums","email":"madhums8@gmail.com"}],"time":{"modified":"2022-06-20T07:24:38.947Z","created":"2013-04-21T01:06:58.719Z","0.1.0":"2013-04-21T01:07:05.645Z","0.1.4":"2013-05-02T07:05:48.603Z","0.1.5":"2014-01-08T09:01:55.833Z","0.2.0":"2014-10-01T16:32:34.274Z","0.2.1":"2014-10-01T18:08:18.622Z","0.2.2":"2014-10-01T18:13:30.977Z","0.2.3":"2015-01-27T21:13:34.411Z","0.2.4":"2015-12-03T08:42:11.226Z"},"author":{"name":"TJ Holowaychuk","email":"tj@vision-media.ca"},"repository":{"type":"git","url":"git://github.com/madhums/mongoose-migrate.git"},"users":{"hfcorriez":true,"davidhalldor":true,"mrmaksimize":true},"homepage":"https://github.com/madhums/mongoose-migrate#readme","keywords":["migrate","migrations","mongoose"],"contributors":[{"name":"Madhusudhan Srinivasa","email":"madhums8@gmail.com"}],"bugs":{"url":"https://github.com/madhums/mongoose-migrate/issues"},"readmeFilename":"Readme.md"}