Questions tagged [mongock]

Mongock is a java MongoDB tool for tracking, managing and applying database schema changes across all your environments based on a coding approach.

63 questions
1
vote
1 answer

How to fix the issue with Java 9 Modularity after adding dependency on mongock?

We are developing Spring Boot application that is using MongoDB as storage. And we want to add to our project the DB migration tool: mongock. in pom.xml I added a new dependency: com.github.cloudyrock.mongock
user471011
  • 7,104
  • 17
  • 69
  • 97
1
vote
2 answers

An attempt was made to call a method that does not exist com.github.cloudyrock.mongock.SpringMongockBuilderBase.lambda$getMongoTemplateProxySupplier

Using Mongock https://github.com/cloudyrock/mongock for data migration spring boot 2.3.1.RELEASE, Previously was using Mongobee but due to this error org.springframework.beans.factory.UnsatisfiedDependencyException:Error creating bean with name…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Run Mongock before @Configuration annotated class

I want to use Mongock migration tool to initialize my app's configuration that is stored in database. The problem I have is that one of my configs is used in class that is annotated with @Configuration. As Mongock changesets are executed after…
0
votes
1 answer

What to do when name of class and collection used in Mongock migration file has changed?

I have an app in Spring Boot and use Mogock with MongoDB. Recently, I made a big refactoring and changed many class names and collection names. What I used to have before refactoring is an entity FooDb: @Document("foo") public class FooDb { @Id …
Whistleroosh
  • 87
  • 1
  • 6
0
votes
1 answer

Mongock failing to log scripts w runAlways=true in mongockChangeLog collection

I currently have four ChangeUnits written as follows: id="system-codes-initializer" (runAlways=true) id="source-config-initializer" (runAlways=true) id="action-box-initializer" (runAlways=false) id="button-action-initializer"…
foj
  • 7
  • 2
0
votes
1 answer

Mongock "Wrong parameter [ClientSession]. Dependency not found" error

I'm trying to run the standalone-mongodb-sync example (https://github.com/mongock/mongock-examples/tree/master/mongodb) in the Mongock examples directory with mongodb-v3-driver. The only documentation about Client Session that I could find on…
foj
  • 7
  • 2
0
votes
0 answers

Mongock support for JSON changelogs

I'd ideally like to specify my changelog in JSON format, similar to Liquibase's JSON option, as follows below. Notably, I'd also like to do a substitution for the Integer value of clusterId at runtime as well, and wonder if property substitution is…
foj
  • 7
  • 2
0
votes
1 answer

Mongock support for executing changelogs with parameters?

I'm wondering whether Mongock has support for running a changelog multiple times with a list of parameters. My use case involves needing to insert multiple documents following the same template into one MongoDB collection, but with various values…
foj
  • 7
  • 2
0
votes
1 answer

Mongock spring-boot delay bean creation until Mongock is done

With liquibase and Spring Boot I can do @DependsOn("liquibase") to wait when I have a @Bean creating method. This lets me create beans that depend on initialization data. How do I do this in mongock? I saw this question but I need to order the bean…
mikeb
  • 10,578
  • 7
  • 62
  • 120
0
votes
1 answer

How to calculate price for mongock professional?

can someone please explain how exactly pricing strategy for mongock professional works? I can see on this webpage that price is "$20 / unit in production per month", but what is "unit" in this context? Is it single ChangeUnit class? How can I…
0
votes
1 answer

Does Mongock support Mongo version 2.x?

I have to execute migrations on the mongo server version: 2.6.10. I use mongock-springboot 5.2.4, spring boot version 2.7.2 and spring-data-mongodb version 3.4.2. I don't think it's possible[1], but I'm not sure hence the question. [1] I see that…
Filip Kowalski
  • 144
  • 1
  • 3
  • 15
0
votes
1 answer

Mongock execute range of change-units in integration test

Question: How can I execute certain range of change-units in integration tests ? Example of the problem: I have three change-units: X,Y,Z (with order set to: 1, 2, 3). I have integration tests T1 for X, Y and T2 for Z. How can I execute only…
Filip Kowalski
  • 144
  • 1
  • 3
  • 15
0
votes
1 answer

Repository for mongock-core 4.3.8

I try to update my mongock-core dependency to 4.3.8 (from 3.3.2) but it does not find the jar for the dependency. So i have checked on the maven central repository i am using (https://repo1.maven.org/maven2) and i see that 3.3.2 indeed has the…
T.S.
  • 29
  • 7
0
votes
0 answers

Migration not starting with mongock 4.3.8

I am trying to create indexes on a mongodb collection using mongock version 4.3.8. The mongockLock and mongockChangeLog collections are eventually created, but the migration itself does not run. mongockChangeLog table is empty. Query…
NeverSleeps
  • 1,439
  • 1
  • 11
  • 39
0
votes
1 answer

mongock: @Execution vs @BeforeExecution

Where is I should define scheme validation rules using mongock as migration tool? In official library examples it's placed in the @BeforeExecution section. Why?
Hett
  • 3,484
  • 2
  • 34
  • 51