Liquibase as SaaS To Configure Multiple Database as Dynamic

25 Views Asked by At

I'm currently working on a Liquibase project where my Liquibase application needs to dynamically connect to multiple databases based on records stored in a connection table. Each record in this table contains JSON data with connection details such as connection name, username, and password. My goal is to fetch records from this table, connect to the corresponding database using the provided credentials, and generate initial SQL scripts for the tables in that database like need to apply the changes in the records in the connection table.

Here's the workflow I'm envisioning:

Liquibase connects to the default database, Master DB which has an connection table with multiple datasource records. Liquibase needs to read datasources from the connection table. Using the details from connection table, Liquibase dynamically connects to the specified database. Once connected, it generates initial SQL scripts for the tables in the connected database. Same way it needs to new SQL changes to all the Datasources in the connection table I've explored various approaches, but I'm struggling to implement this dynamically changing database connection and script generation in Liquibase.

If anyone in the Liquibase community has experience with similar requirements or can provide guidance on how to achieve this, I'd greatly appreciate your insights! Please share your thoughts, suggestions, or code examples that can help me solve this challenge.

I'm currently working on a Liquibase project where my Liquibase application needs to dynamically connect to multiple databases based on records stored in a connection table. Each record in this table contains JSON data with connection details such as connection name, username, and password. My goal is to fetch records from this table, connect to the corresponding database using the provided credentials, and generate initial SQL scripts for the tables in that database like need to apply the changes in the records in the connection table.

0

There are 0 best solutions below