[multitenancy] How to run different SQL scripts for different tenants?

I have a Spring Boot application using Liquibase (version 4.19.1) in a multi-tenant mode. I would like to run different change sets for each tenant. I would appreciate advice on how to handle this kind of applications.

Thanks in advance.

Hi @lumal-nov,

There is a multi-tenant Spring Bean included the Liquibase codebase, but it doesn’t support per-tenant change sets. You could override this behavior for your purposes. Take a look at the code here → liquibase/liquibase-standard/src/main/java/liquibase/integration/spring at master · liquibase/liquibase · GitHub

This has the normal Spring classes plus the MultiTenantSpringLiquibase class. That should give you a good foundation from which to extend.