database-class

The database-class global parameter is a string that specifies which implementation of our Database class to use. By default, Liquibase automatically determines the correct class based on your database connection.

Uses

When Liquibase connects to a database, it selects an implementation of our Database class that represents the type of database you have connected to. We use that selection to know what kind of database you have and what functionality it supports.

You should generally rely on Liquibase’s auto-detection logic to implement the Database class. However, you can override the selected class with the database-class parameter.

Syntax

You can set this parameter in the following ways:

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

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.databaseClass=<string>
Liquibase Environment Variables
LIQUIBASE_DATABASE_CLASS=<string>

For more information, see Working with Command Parameters.