Working on different databases in mongoDB

Hello,

I have two questions about Liquibase with MongoDB. Appreciate your answers in advance.

1- In our system, there are applications and every application has their own database. As I see in the README of liquibase-mongodb extension, we need to provide database in liquibase property file. But because I have different databases for each application, I couldn’t provide the database name. How can I achieve this?

2- I know eval command is deprecated starting from MongoDB 4.2 and liquibase-mongodb extension doesn’t support this command. But we can use some commands like createCollection, dropCollection etc. What I ask is we have JS files and we use MongoDB load() function to execute this scripts during deployment. Can we achieve this in liquibase?

Many thanks,

Hi @talha ,

I can answer one of your question.
For question 1, I believe one properties file can have only one database at a time. I would suggest you to have a separate folder for different database and have their own liquibase properties file. For example:

ApplicationOne/DBOne/liquibase.properties
ApplicationTwo/DBTwo/liquibase.properties