liquibase-catalog-name parameter

The liquibase-catalog-name parameter specifies the catalog to use for Liquibase objects. It allows Liquibase to access a specific database catalog where Liquibase can store the DATABASECHANGELOG and DATABASECHANGELOGLOCK tables. The concept of a catalog varies between databases because not all databases have catalogs. For more information, refer to your database documentation.

Uses

A database catalog is typically an organized inventory of data assets in your database. It helps you collect and manage your metadata with the definitions of database objects, such as tables, views, synonyms, value ranges, indexes, users, and user groups.

You can use the liquibase-catalog-name parameter to specify the catalog in which to locate and store Liquibase objects created when running Liquibase operations.

Setting the liquibase-catalog-name parameter

You can set the liquibase-catalog-name parameter in one of the following ways:

Note: If you do not set liquibase-catalog-name, Liquibase will use the default catalog.

liquibase-catalog-name in the liquibase.properties file

You can set the liquibase-catalog-name parameter by adding the following to your liquibase.properties file:

liquibase.liquibaseCatalogName: <your_catalog_name>

liquibase-catalog-name as a CLI global parameter

You can use liquibase-catalog-name as a global parameter in your command line with a Liquibase command, such as update:

liquibase --liquibase-catalog-name=<your_catalog_name> update --changelog-file=dbchangelog.xml

liquibase-catalog-name as an environment variable

If you use Liquibase Pro, you can set liquibase-catalog-name as an environment variable.

The syntax for Mac/Linux:

LIQUIBASE_LIQUIBASE_CATALOG_NAME=<YOUR_CATALOG_NAME>

The syntax for Windows, which requires the set command:

set LIQUIBASE_LIQUIBASE_CATALOG_NAME=<YOUR_CATALOG_NAME>

Note: The commands shown above only apply to the current shell. If you need to pass an environment variable to a child process without affecting the parent process, you can use the export command on Mac/Linux or the setx command on Windows.

Related links