Skip to Main Content

How to make sqlcl use databasechangelog table from specific schema

krow7Jul 21 2021

I want to make sqlcl use databasechangelog table from a specific schema.
Assume we have the following set of schemas:
MGMT - Management schema
ORDERS - Biz schema
SHIPPINGS - Biz schema
And I have the following main.sql file to deploy my code:

alter session set current_schema=ORDERS
lb update -changelog orders/controller.xml

alter session set current_schema=SHIPPINGS
lb update -changelog shippings/controller.xml

But with such an approach sqlcl creates databasechangelog table in the current schema. I want to manually tell sqlcl to use one from MGMT . Using liquibase I can set liquibaseSchemaName property ( to define such a schema.
Is sqlcl able to handle the same behavior? If yes, then how to achieve it?
Any thoughts would be appreciated.

Post Details
Added on Jul 21 2021