A migration framework for Node.js that stores migration state in MongoDB instead of a local file, forked from visionmedia/node-migrate. Version 0.2.4 is the latest release (last updated 2013). It requires a config file with MongoDB connection details and uses an environment variable to point to it. Designed for environments like Heroku where the filesystem is ephemeral. Release cadence is low; no recent updates. Differentiator: persists migration records in a MongoDB collection, avoiding the need for a local .migrate file.
npm install mongoose-migrateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setting up a config file with MongoDB connection and creating a simple migration.
Set environment variable before running command.
Consider alternatives like migrate-mongoose or node-pg-migrate.
Place all migration files in a folder named 'migrations' at root.
Create config file as shown in documentation.
Install globally: npm install -g mongoose-migrate
Set NODE_MONGOOSE_MIGRATIONS_CONFIG=./path/to/config.js before running
Start MongoDB or update db in config