Mondex is a MongoDB index managing tool built on top of golang-migrate. It provides a simple and efficient way to manage MongoDB indexes through migration scripts.
- Seamless Integration: Integrates with
golang-migrate
to apply migrations to MongoDB. - Easy Setup: Quickly set up and manage your MongoDB indexes.
- Structured Logging: Provides detailed and structured logging for better traceability.
go install github.com/ltman/mondex@latest
Create a mondex.yml configuration file in your project root:
mongo_uri: "mongodb://localhost:27017"
database_name: "your_database"
schema_file_path: "path/to/schema/file"
migration_dir: "path/to/migrations"
log_level: "info"
Apply current migrations to the database:
mondex apply
Generate migration scripts based on schema differences:
mondex diff your_migration_name
Format the database schema file:
mondex format
Inspect and output the current database schema:
mondex inspect
Identify how to use mondex
mondex help