A Node.js migration framework for MongoDB that persists migration state in the database, supports checksums to detect changes in already-applied migrations, rollback on error, replica sets, and synchronous/asynchronous migrations. The current version is 1.0.1 (no recent updates). It features a programmatic API and a CLI, differentiating from other MongoDB migration tools by its built-in checksum verification and automatic rollback.
npm install mongrationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes mongration with MongoDB config, defines a migration step, adds it, and runs up to 3 pending migrations.
Always include 'migrationCollection' in the configuration object.
Ensure each step has a unique 'id' (string).
Always invoke 'next' (or 'next(err)') inside 'up' and 'down' functions.
Pin mongodb driver to version 2.x or use an alternative like migrate-mongo.
Run 'npm install mongration' and ensure node_modules is in the require path.
Use 'const migration = new Migration(config)' then 'migration.add(step)'.
Ensure each step has 'up: function(db, next) { ... }'.No dependency data recorded yet.