A node-based migration framework for Mongoose, forked from migrate-mongoose with updated mongoose version (4 to 5) and removal of throw error when no migrations to run. Current version 0.2.2. Stores migration state in MongoDB, supports custom config files, environment variables, and CLI commands (create, up, down, list, prune). Differentiators: global migration state (no local file state), access to mongoose models, promise/callback support, and ability to delete unused migrations. Ideal for projects already using mongoose and deploying on platforms like Heroku.
npm install migrate-mongoose-customNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to install, define a migration with up/down functions using async/await, and run it via CLI.
Ensure mongoose@5 is installed.
Use require() instead of import.
Understand that migration state is stored in MongoDB collection.
Consider using the original migrate-mongoose or migrate-mongoose-custom (check latest version).
npm install migrate-mongoose-custom
Use this.model('ModelName', schema) inside up/down functions.Provide connection URI via -d or set MIGRATE_dbConnectionUri env var.