75 questions
0
votes
0
answers
73
views
Mongock rollback method is not executed
I have a collection migrationTest in MongoDB with a unique index for the message field.
In my migration I'm inserting documents to this collection and in one place I'm using the existing message to ...
1
vote
3
answers
241
views
How to avoid K8s killing pod in a large migration
We are in middle of a migration project where we want to migrate millions of documents from one mongo collection to another (or in certain cases add a new field to existing documents). During testing ...
0
votes
1
answer
175
views
Error 'writeConcern is not allowed within a multi-statement transaction' when starting springboot application with mongock changeunits
I have a springboot application where am integrating mongock to add indices to the database. When I start the application, I see the below exception:
Caused by: io.mongock.api.exception....
0
votes
1
answer
107
views
Is it possible to write in more than one Database using Mongock?
Is it possible to write in more than one database in Mongock?
I am trying to write in 2 different databases using Mongock.
@ChangeSet(order = "005", id = "changeWithMongockTemplate1&...
-1
votes
1
answer
305
views
What are consequences of deactivating the Mongock-Lock?
Mongock documents that the "default, expected and documented behaviour" for database migrations is to acquire a pessimistic lock on the whole database.
It is, however, possible to run a ...
0
votes
1
answer
137
views
Is there a documented Mongock File Naming Convention? [closed]
Looking through the example documentation, it seems that Mongock does not embed any sort of ordering in the ChangeUnit filename.
For example, the "Get Started" docs show the following code ...
1
vote
1
answer
530
views
Mongock - Removing outdated ChangeUnit after migration is done (runAlways = false)
I have a ChangeUnit for deleting one collection in my database. The migration has already been done and such change will no longer be required. I am wondering if I can delete the class and get rid of ...
0
votes
0
answers
363
views
Field 'writeConcern' is currently not supported using Mongock with AWS Document DB
I am switching a Spring boot application that currently uses Mongo DB, to AWS Document DB. The application uses Mongock to run some scripts to setup the database when it starts up.
Now, when I disable ...
0
votes
1
answer
473
views
Mongock changelog files executing in local system but not executing on server after deployment
Able to execute Mongock changelog files successfully in local but changelog files not executing when I am deploying application jar to the server . I am not getting any error as well. I can see ...
0
votes
2
answers
1k
views
Database Migration with Mongock and Spring Boot
I have a class
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document("animal")
public class Animal {
private String id;
private boolean isBirthYear;
}
I want to update class to:
@...
0
votes
1
answer
772
views
can't create an index with mongock on a mongodb collection
Each time I try to create an index on a collection with mongock I have this error:
Command createIndexes does not support this transaction's { readConcern: { level: "majority", provenance: &...
0
votes
1
answer
245
views
Kotlin + Mongock for Spring Boot + Spring Data: IllegalAccessError
I have created a Kotlin application that connects to a MongoDB on Atlas to fetch some data via Spring Data JPA. For future changes to the document structure, I have experimented with Mongock. I have ...
0
votes
2
answers
646
views
MongoCK ChangeUnit doesn't auto wire other spring beans as dependency
How do I make the ChangeUnit work with other spring beans in my app? I've tried adding dependencies to the ChangeUnit via construction injection and setter injection, and using post construct to build ...
0
votes
1
answer
602
views
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 ...
0
votes
1
answer
210
views
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-...