Data migration tool for Mongoose (v0.2.0). This package allows you to manage database migrations for Mongoose models via a CLI tool. It uses a configuration file (`.migrate.json`) to define the database connection and model paths, and provides commands to create, run, and rollback migrations. The last release was in 2014, and the project has no recent updates. It is a lightweight alternative to more robust migration tools like `migrate-mongoose`, but lacks features like environments and timestamp-based migration. Note that the package is outdated and may not be compatible with modern Mongoose versions (>=5.x).
npm install mongoose-migrationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create and run a migration using the CLI and CommonJS module exports.
Use `migrate-mongoose` or other actively maintained migration tools.
Ensure migration scripts use `this.model('ModelName')` instead of directly `require`ing models.Run `migrate init` first and ensure the file is correctly configured.
Ensure the path is relative to the project root (e.g., 'models/user.js' or absolute path).
Use regular function expressions: `exports.up = function(next) { ... }`.