We are going to rename a mongodb collection and writing migration script in our spring boot microservice.Is it ok to use mongock for the same? Trying to understand if the changeunit is executed once on app startup, would it throw exception once it is restarted and does not find the old collection to be renamed.
mongoTemplate.getCollection("collection1").rename("collection2");
On first execution it will be renamed but what about second time the application is deployed.