In one of my projects, I was looking for some simple options to manage MongoDB database schema changes similar to other projects like Flyway or Liquibase. I found Mongock, which is an open-source Java MongoDB tool.
Prerequisites
- Spring Boot 2.5.0
- Maven 3.6.1
- JAVA 11
- Mongo 4.4
Getting Started
We will start by creating a simple Spring Boot project from start.spring.io, with the following dependencies: Web, MongoDB, and Lombok.