A lightweight migration tool for Mongoose (MongoDB), inspired by Django's migration system. Version 0.1.7 is the latest stable release, with no frequent updates. It provides a CLI for creating and running migrations, supports configuration via environment variables, config file, or CLI arguments. Key differentiators: minimal API focused on simple schema migrations (CreateModel, AddField), designed for small to medium projects, but limited features compared to alternatives like migrate-mongoose.
npm install mangoose-migrateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows installation, configuration via env var, migration creation, and a complete migration file with CreateModel operation.
Be careful when copy-pasting package names; use 'mangoose-migrate' as spelled.
Use `export default class YourMigration extends Migration { ... }`Ensure the URI ends with '/databaseName' (e.g., mongodb://localhost:27017/mydb).
Pass plain object definitions, not Schema instances.
Ensure mangoose-migrate is installed locally (npm install mangoose-migrate) and your Node.js version supports subpath exports (>=12.17.0).
Add `export default class AddUsers extends Migration { ... }` and import Migration from 'mangoose-migrate/core'.Use a regular async function for `up` (not arrow function) and call `this.addOperation(...)`.
Verify the MONGODB_URI includes correct username/password and optionally add `?authSource=admin`.