Applies to:
- Liquibase Pro
Liquibase Open Source (Community)
Summary:
Liquibase will deploy changesets and store the Liquibase tracking tables (DATABASECHANGELOG and DATABASECHANGELOGLOCK tables) in the database's default schema. However, Liquibase has additional attributes to allow greater control over which schema changesets will be deployed and where to store and update the Liquibase tracking tables.
Environment Conditions:
- Liquibase Pro or Open Source
How to: Set the schema for the Liquibase tracking tables
- Create a schema that Liquibase will use for the DATABASECHANGELOG and DATABASECHANGELOGLOCK tables
- In Liquibase, set the schema name (created in step 1) for Liquibase objects by using one of the following methods:
- liquibase.properties file:
-
liquibase.liquibaseSchemaName:
-
-
CLI argument:
-
--liquibase-schema-name=
-
-
JVM system property:
-
JAVA_OPTS=-Dliquibase.liquibaseSchemaName=
-
- Liquibase Environment Variable:
-
LIQUIBASE_LIQUIBASE_SCHEMA_NAME=
-
- liquibase.properties file:
- With the Liquibase schema name set, deploy any changesets, and the DATABASECHANGELOG and DATABASECHANGELOGLOCK tables will be created in the specified schema. All deployed changeset information will appear in the DATABASECHANGELOG table.
- NOTE: the scripts will be deployed to the default schema set for the database. The Liquibase schema name only sets the schema location for Liquibase objects.
How to: Set the default schema name for changesets being deployed
- In Liquibase, set the default schema name for changeset by one of the following methods:
- liquibase.properties file:
-
liquibase.command.defaultSchemaName:
-
- CLI argument:
-
--default-schema-name=
-
- Liquibase Environment Variable:
-
LIQUIBASE_COMMAND_DEFAULT_SCHEMA_NAME=
-
- liquibase.properties file:
- Liquibase will deploy any changesets to the schema set in step one. This overrides the default schema name set in the database.
- NOTE: If the Liquibase schema name isn't set, the Liquibase tracking tables (DATABASECHANGELOG and DATABASECHANGELOGLOCK table) will be created and maintained inside this schema.
Comments
0 comments
Article is closed for comments.