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-migrateto 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/qwenode/mondex@latestCreate 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 applyGenerate migration scripts based on schema differences:
mondex diff your_migration_nameFormat the database schema file:
mondex formatInspect and output the current database schema:
mondex inspectIdentify how to use mondex
mondex help