defaultSchemaName in custom sql with default schema

Hi,


we’re using a lot of custom sql statements in liquibase scripts. Every statement including some table name must be prefixed with schema so it is executed on correct table.

For example:

  1. alter table ${database.defaultSchemaPrefix}groupstate alter column grscontextid bigint not null

the table name must be manually prefixed with schema, otherwise it will alter the table in default schema.


We’re using  }

Is there another way how to make custom sql refactorings work with schema/schemaless environments?


One possibility would be to have schema always non-empty and use ${database.defaultSchemaName}.tableName, but then we would need to determine default schema from the connection (if not specified explicitly), because empty defaultSchemaName would result in .tableName statement (dot+tableName).