mongodb-migrations
A database migration tool for MongoDB
Decision gist · record as of 2026-08-14
Yes, if you need MongoDB schema versioning and can accept a dormant project. The tool is stable for its core use case (running timestamped migrations), has no known vulnerabilities, and low install friction. However, the 823-day maintenance gap and GPLv3 copyleft license mean you should verify compatibility with your MongoDB and Python versions before adopting, and confirm that GPLv3 licensing aligns with your project's legal requirements.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a config.ini file with MongoDB connection details (host/port/database or url) and a migrations folder with timestamped migration files.
- Low friction install with only pymongo and configparser as runtime dependencies.
- Project is dormant (last commit 2024-08-05, no release for 823 days), so expect no active maintenance or bug fixes going forward.
License · maintenance · safety
GPLv3 (copyleft) — GPLv3 copyleft license means any code that uses this package must also be released under GPLv3 or a compatible license; proprietary projects cannot incorporate it without legal risk.
last release 2024-05-13 (823 days) · last repo commit 2024-08-05 · 76 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 107,848 downloads/mo, #12,592 on PyPI
Alternatives
Verify before relying
pip install mongodb-migrations
# Create migrations/20160320145400_description.py with a Migration class extending BaseMigration
# Implement upgrade() method
from mongodb_migrations.migration_manager import MigrationManager
manager = MigrationManager()
manager.config.config_file = "config.ini"
manager.config._from_ini()
manager.run()- Whether the dormant status and 823-day gap since last release pose compatibility risks with current MongoDB or Python versions.
- Whether GPLv3 copyleft applies to migration scripts themselves or only to the tool's source code.
What it is and what it does
mongodb-migrations is a command-line and programmatic tool for versioning and applying schema changes to MongoDB databases. It works by reading timestamped Python migration files from a migrations folder, each containing a Migration class with upgrade and downgrade methods, and tracking which migrations have been applied via a metastore collection in MongoDB itself.
The tool is designed for teams that need to evolve their MongoDB schema over time without losing data. It supports both CLI execution (via the `mongodb-migrate` command) and direct Python API calls through MigrationManager, allowing you to integrate migrations into deployment pipelines. Configuration is handled via config.ini or command-line arguments, supporting both direct host/port/database settings and MongoDB connection URLs with optional authentication.
Use it for
- Apply coordinated schema changes across a MongoDB database as your application evolves, tracking which migrations have run.
- Downgrade to a previous migration state by running downgrade methods when a deployment needs to be rolled back.
- Migrate to a specific point in time using --to_datetime to upgrade or downgrade only to a particular migration timestamp.
- Integrate migrations into CI/CD pipelines by calling MigrationManager programmatically instead of using the CLI.
- Manage multiple MongoDB instances with the same migration set by configuring different databases in config.ini or command-line arguments.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need MongoDB schema versioning and can accept a dormant project.
The tool is stable for its core use case (running timestamped migrations), has no known vulnerabilities, and low install friction. However, the 823-day maintenance gap and GPLv3 copyleft license mean you should verify compatibility with your MongoDB and Python versions before adopting, and confirm that GPLv3 licensing aligns with your project's legal requirements.
Install
mongodb-migrations on PyPI
Before you install
Low friction install with only pymongo and configparser as runtime dependencies. Project is dormant (last commit 2024-08-05, no release for 823 days), so expect no active maintenance or bug fixes going forward.
Requires a config.ini file with MongoDB connection details (host/port/database or url) and a migrations folder with timestamped migration files.
License in practice
GPLv3 copyleft license means any code that uses this package must also be released under GPLv3 or a compatible license; proprietary projects cannot incorporate it without legal risk.
Quickstart
pip install mongodb-migrations
# Create migrations/20160320145400_description.py with a Migration class extending BaseMigration
# Implement upgrade() method
from mongodb_migrations.migration_manager import MigrationManager
manager = MigrationManager()
manager.config.config_file = "config.ini"
manager.config._from_ini()
manager.run()
Verify before relying
- Whether the dormant status and 823-day gap since last release pose compatibility risks with current MongoDB or Python versions.
- Whether GPLv3 copyleft applies to migration scripts themselves or only to the tool's source code.
Package facts
| License | GPLv3 copyleft |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespymongoconfigparser |
| Maintenance | Dormant 823 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 107,848 / month, #12,592 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: mongodb_migrations-1.3.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mongodb schema migration”
- mongodb-migrationsManages schema migrations for MongoDB databases by running…
- azure-mgmt-datamigrationManages Azure Data Migration resources and orchestrates database…
- marshmallow-mongoengineGenerates marshmallow schemas automatically from mongoengine document…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also alembic · yoyo-migrations · Flask-PyMongo · clickhouse-migrations · peewee-migrate · sqlalchemy-migrate · Flask-Migrate · django-pg-zero-downtime-migrations · schemachange · maggma