Registry / database / mms

mms

JSON →
library0.1.7jsnpmunverified

MMS is a MongoDB migration tool that uses the native mongo shell for execution, ensuring compatibility with MongoDB's own scripting language. Version 0.1.7 is the current stable release, with infrequent updates and a small user base. It differentiates from other migration tools like db-migrate or node-pg-migrate by tightly coupling with the mongo shell, which allows for native MongoDB queries and commands, but restricts usage to environments where the mongo shell is available. The tool provides basic commands: create, migrate, rollback, and status, and uses configuration-driven migration files. It is suitable for teams already standardized on mongo shell scripts.

database
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

The package does not export a specific module; it is a CLI tool. Importing as shown is for illustrative consistency, but actual usage is via command line: npx mms create

import mms from 'mms'

Demonstrates creating a migration file and running it against a MongoDB instance using the mongo shell.

// Initialize a migration npx mms create my-migration // Output file: migrations/20250301000000-my-migration.js // Edit the file with your mongo shell script // Run migrations npx mms migrate --uri 'mongodb://localhost:27017/mydb' // Check status npx mms status --uri 'mongodb://localhost:27017/mydb'
Debug
Known footguns
gotchaRequires the mongo shell (mongosh) to be installed and available on PATH.
gotchaMigration scripts are executed via temporary files; ensure your OS supports temporary file creation.
deprecatedUses bluebird for promises, which is deprecated in favor of native promises.
gotchaOnly supports MongoDB connection strings via --uri flag; no support for environment variable overrides.
gotchaRollback is limited: it only rolls back the last step if migration fails, not a full undo of a migration.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources
packagemms