### Install mongo-migrate Source: https://github.com/blitzcode-io/mongo-migrate/blob/main/README.md Install the mongo-migrate package using pip. This is the first step to using the library. ```bash pip install mongo-migrate ``` -------------------------------- ### Create a new migration Source: https://github.com/blitzcode-io/mongo-migrate/blob/main/README.md Use the 'create' subcommand to generate a new migration file. Provide database connection details and a message for the migration. ```bash mongo-migrate create --host 127.0.0.1 --port 27017 --database test --message 'first migration' ``` -------------------------------- ### Upgrade database to a specific migration Source: https://github.com/blitzcode-io/mongo-migrate/blob/main/README.md Use the 'upgrade' subcommand to bring the database schema up to a specified migration version. Include connection details and the target migration timestamp. ```bash mongo-migrate upgrade --host 127.0.0.1 --port 27017 --database test --upto 20230815092813 ``` -------------------------------- ### Downgrade database to a specific migration Source: https://github.com/blitzcode-io/mongo-migrate/blob/main/README.md Use the 'downgrade' subcommand to revert the database schema to a specified migration version. Provide connection details and the target migration timestamp. ```bash mongo-migrate downgrade --host 127.0.0.1 --port 27017 --database test --upto 20230815092813 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.