include-catalog-in-specification

The include-catalog-in-specification parameter is a Boolean that defines whether Liquibase includes the catalog name when determining equality between the compared databases. The default value is false because you may want to compare the objects across two databases even though the catalogs are named differently in different environments.

Uses

If you run the diff command or the diff-changelog command with the include-catalog-in-specification parameter set to true, Liquibase will identify objects using both their object name and the catalog name.

Let’s say you have:

  • database1 and catalog1, which has the table table1
  • database2 and catalog2, which has the table table1

This way, Liquibase shows that there is a difference in the catalog name when executing the diff command with include-catalog-in-specification set to true. For example, an object of catalog1.my_schema.my_table is seen as a different object than catalog2.my_schema.my_table.

However, if you run the diff command and do not specify include-catalog-in-specification, Liquibase will not see any differences and identify only the database objects without checking if the catalog is the same.

Syntax

For more information, see Working with Command Parameters. You can set this parameter in the following ways:

Option Syntax
Liquibase properties file
liquibase.includeCatalogInSpecification: <true|false>
Global CLI parameter
liquibase
 --include-catalog-in-specification=<true|false> diff
 --changelog-file=mychangelog.xml

JVM system property

JAVA_OPTS Environment Variable

macOS/Linux:
JAVA_OPTS=-Dliquibase.includeCatalogInSpecification=<true|false>
Windows:
set JAVA_OPTS=-Dliquibase.includeCatalogInSpecification=<true|false>
Liquibase Environment Variables macOS/Linux:
LIQUIBASE_INCLUDE_CATALOG_IN_SPECIFICATION=<true|false>
Windows:
set LIQUIBASE_INCLUDE_CATALOG_IN_SPECIFICATION=<true|false>

Note: These commands only apply to the current shell. To set permanent environment variables, see Liquibase Environment Variables.