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

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

Option Syntax
Liquibase properties file
liquibase.databaseClass: <string>
Global CLI parameter
liquibase
 --database-class=<string> update
 --changelog-file=mychangelog.xml

JVM system property

JAVA_OPTS Environment Variable

macOS/Linux:
JAVA_OPTS=-Dliquibase.databaseClass=<string>
Windows:
set JAVA_OPTS=-Dliquibase.databaseClass=<string>
Liquibase Environment Variables macOS/Linux:
LIQUIBASE_DATABASE_CLASS=<string>
Windows:
set LIQUIBASE_DATABASE_CLASS=<string>

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