A migration framework for MongoDB using Mongoose, forked from madhums/mongoose-migrate with two improvements: eliminates the need to configure Mongoose schema/model name (model is auto-named 'Migration'), and config file is a Node module supporting environment variables. Version 0.2.5 is the latest stable release, designed for Node >= 0.8.x. It stores migration state in MongoDB, tracks executed migrations, and supports up/down commands. Key differentiators: simpler configuration, no hard-coded JSON config.
npm install mongoose-migrate-2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows configuration file setup with environment-specific database URLs.
Migrate to migrate-mongo (https://www.npmjs.com/package/migrate-mongo)
Ensure config file exports module.exports = { environment: url };Use -c/--chdir to change working directory, but default path is fixed.
Set MIGRATION_CONFIG_PATH env variable to your config file path.