liquibase-schema-name

The liquibase-schema-name global parameter is a string that specifies the schema to use for the creation of Liquibase objects, like the DATABASECHANGELOG and DATABASECHANGELOGLOCK tracking tables.

Uses

If you are working in a multi-schema project, you can use liquibase-schema-name to separate the DATABASECHANGELOG and DATABASECHANGELOGLOCK tables from other Liquibase objects. This way, you will have a tracking schema and one or more managed schemas.

If you need to work in a test schema for your project, you can set liquibase-schema-name to control where Liquibase looks for the tracking tables during test runs.

Note: It is best practice to only use alphanumeric characters and underscores in your liquibase-schema-name, because hyphens and other special characters may not be supported by your database. If you must use hyphens, you will need to escape the lines that contain hyphens. Many databases, such as PostgreSQL, MySQL, and SQLite support using quotes to escape characters. For example, "schemas-with-a-hyphen-or-dash-symbol-in-the-name". You'll need to refer to the documentation for your DBMS to determine if it supports quoted identifiers.

You do not need to use quoted identifiers if you are using objectQuotingStrategy="QUOTE_ALL_OBJECTS" at the changelog/changeset level.

Syntax

You can set this parameter in the following ways:

Option Syntax
Liquibase properties file (defaults file)
liquibase.liquibaseSchemaName: <string>
Global flow file argument (example)
stages:
  Default:
    actions:
      - type: liquibase
        command: update
        globalArgs: { liquibase-schema-name: "<string>" }
Global CLI parameter
liquibase
 --liquibase-schema-name=<string> update
 --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS Environment Variable)

Unix:

JAVA_OPTS=-Dliquibase.liquibaseSchemaName=<string>

Windows:

JAVA_OPTS=-D"liquibase.liquibaseSchemaName"=<string>
Liquibase Environment Variables
LIQUIBASE_LIQUIBASE_SCHEMA_NAME=<string>

For more information, see Working with Command Parameters.

Related links