Hello, I want to manage multiple databases in one of my PostgreSQL using Liquibase.
I have already setup a dedicated SQL repository for this purpose, but I am struggling on the changelog structure. I try to follow the guide in Managing Multiple Schemas with Liquibase, where I think both of it does not work.
1.Create a root changelog in each database folder.
With this approach, it becomes trouble as I cannot use includeAll in my root changelog to simply include the whole database folder, which will result in circular error. It still works if I just use include, but then I have to update root changelog everytime when I have a new version of changelog.
2.Create a master changelog outside the database folder. Create a root changelog in each database folder.
Following the example, I assume I will include all the child root changelog in my master changelog.
<include file="schemaA/changelog.xml" context="schemaA"/>
<include file="schemaB/changelog.xml" context="schemaB"/>
<include file="schemaC/changelog.xml" context="schemaC"/>
But the master changelog is totally useless as I cannot use it during liquibase update which is called per database --url=jdbc:postgresql://{db_hostname}/{db_name}. If I use the liquibase update using the master changelog, then it will apply other database changelog to the incorrect database.
Please suggest any changelog structure for managing multiple database, thanks.

