Mongock is a java MongoDB tool for tracking, managing and applying database schema changes across all your environments based on a coding approach.
Questions tagged [mongock]
63 questions
2
votes
1 answer
MongoDB: Search by field with date and update it by condition
Please tell me how can I fulfill the following condition - if the time in the info.startDate field is not equal to 00 hours, increase the date (2021-05-27) by 1 day ahead, set the time to 00:00:00.000Z. I tried to do it clumsily, through Mongock,…

Сергей Воронин
- 35
- 3
2
votes
1 answer
ns does not exist, com.mongodb.MongoCommandException
Using mongock to perform the data migration but end up with below error.
Gradle
plugins {
id 'java'
}
group 'fete.bird'
version '0.0.1-SNAPSHOT'
repositories {
mavenCentral()
}
ext {
set('mongockVersion', "4.1.14")
}
dependencies {
…

San Jaisy
- 15,327
- 34
- 171
- 290
2
votes
2 answers
What Version Control tools are available for MongoDB
I'm planning to integrate mongodb based migration tool in my spring boot application which is having spring-data dependency in project. I found main two libraries 1) Mongobee 2) Mongock.
I need some feedback which one should i choose ? Thanks in…

Ketan Jariwala
- 225
- 4
- 12
1
vote
1 answer
MongockException: Command failed with error 251 (NoSuchTransaction)
I am using Spring-Boot 3.0.4 and I have upgraded Mongock from 4.3.8 to 5.2.2.
pom.xml snipped
io.mongock
mongock-springboot
…

1Z10
- 2,801
- 7
- 33
- 82
1
vote
1 answer
Mongock does not run changeunit in kotlin project
I have Java + maven project - https://github.com/petersuchy/mongock-test-java based on Mongock reactive example (https://github.com/mongock/mongock-examples/tree/master/mongodb/springboot-reactive)
And everything works well.
I tried to migrate that…

Peters
- 35
- 5
1
vote
4 answers
Could not found method getBuilder in io.mongock.runner.springboot.config.MongockContext required a bean of type 'ConnectionDriver'
I have a problem with proper configure mongock for my project.
I have added to pom.xml dependencies:
io.mongock
mongock-springboot
…

Piotr
- 569
- 6
- 20
1
vote
1 answer
How to implement @RollbackExecution method for Mongock
I have simple document class:
public class Player {
private String name;
private String age;
}
I want to extend it with field Parameters:
public class Player {
private String name;
private String age;
private Parameters…

krzysiekcr
- 11
- 3
1
vote
2 answers
java mongo json schema validation
I would like to know if mongock supports synthax such as:
"allOf": [{ "$ref": "/schema/base" }]
when it build the validation during the collection creation or if you know a library that can be used to "merge" all the references in a unique big…

Stefania
- 641
- 1
- 12
- 34
1
vote
1 answer
Mongock migration failure with transaction
I'm running a spring boot 2.4.3 app and I have a mongodb 4 cluster which supports transactions(I run it locally using run-rs). I'm also using spring data mongodb. I'm trying to integrate mongock(latest version - 4.3.8) for db migrations but I face a…

Hristo Angelov
- 1,019
- 1
- 15
- 34
1
vote
1 answer
Mongock inserting duplicate changeset on runAlways=true
My application uses mongock 4.1.19 and when ever there is a changeSet with runAlways=true, there are duplicate entries getting created in the dbchangelog collection.
the below line does not seem to consider already executed case and may be resulting…

Tar
- 13
- 4
1
vote
1 answer
Error creating mongock bean when deploying on docker
I am using Mongck to migrate data in my Spring Boot application. Spring Boot application runs perfectly locally. But when running on docker, the following error occurs:
org.springframework.beans.factory.BeanCreationException: Error creating bean…

Phuc Nguyen
- 371
- 1
- 3
- 14
1
vote
2 answers
Mongock migration fails to run mongockSpringLegacyMigration
I am trying to run mongock to handle my DB migration with versioning, but getting an exception from the mongock infrastructure,
Also please note I am not using spring-boot only the spring bean system,
there is no option for me to use spring…

Roie Beck
- 1,113
- 3
- 15
- 30
1
vote
0 answers
jHipster mongock migration
I am migrating off of mongobee to mongock so we can use Atlas. I've followed the commits on the suggested changes that have been merged into master and have modified CloudDatabaseConfiguration, DatabaseConfiguration, and InitialSetupMigration…

Cam
- 11
- 1
1
vote
1 answer
How to inject beans without interface in Mongock changelogs
I am in the process of migrate a spring boot application from 2.2.2 to 2.2.3. I also upgrade mongock to 4.1.16 as the version 2.0.2 used so far is not compatible anymore.
I have this changelog which works fine in 2.0.2 but not in 4.1.16 :
…

Olivier
- 65
- 3
1
vote
1 answer
How to transfer objectId to other changesets in mongock?
I'm trying to transfer the previously created ID to other changesets in mongock. This is my solution but I don't know if it's correct. I will be grateful if you could share your proposition.
@ChangeLog(order = "001")
public class DatabaseChangelock…

LittleBee
- 11
- 1