diff-changelog

Last updated: April 8, 2026

The diff-changelog command displays the differences between two databases you are comparing. It also generates a changelog file containing deployable changesets to resolve most of these differences.

Uses

The diff-changelog command is typically used when you want to create a deployable changelog to synchronize multiple databases. The diff-changelog command also provides more information about database drift:

  • Missing objects in your database

  • Changes made to your database

  • Unexpected items in your database

In Liquibase Secure 4.25.1 and later, you can use diff-changelog to seamlessly generate a Drift Report for your databases.

In order to track changes to a database, you can generate a snapshot of the database, make the changes, and create a changelog, which you can use to compare the snapshot with your database.

Running the diff-changelog command

Running the diff-changelog command requires two URLs:

  • reference-url– the source for the comparison. The --reference-url attribute represents your source (reference) database, which is the basis for the database you want to compare.

  • url– the target of the comparison. The --url attribute represents your target database, which you want to compare to the source (reference) database. You typically perform actions and run commands on this database.

To create a diff changelog:

Option 1

Run the diff-changelog command with all necessary attributes in the CLI:

liquibase diff-changelog --changelog-file=example-changelog.xml --url="jdbc:oracle:thin:@<IP OR HOSTNAME>:<PORT>:<SERVICE NAME OR SID>" --username=<USERNAME> --password=<PASSWORD> --reference-url="jdbc:oracle:thin:@<IP OR HOSTNAME>:<PORT>:<SERVICE NAME OR SID>" --reference-username=<USERNAME> --reference-password=<PASSWORD>

Note: To run this command with an offline database snapshot, use the following pattern for the reference URL: --reference-url="offline:mysql?snapshot=SNAPSHOT_DEV.json".

For best results, specify all commands and parameters in the --kebab-case format in the CLI. If your preference is camelCase, it also works in the CLI.

Liquibase recommends that you place your database's JDBC driver JAR file in the $LIQUIBASE_HOME/lib directory. If you place the driver file in a different directory, specify the path in the properties file: classpath:../<path-to-drivers>/ojdbc<version>.jar. When you run the diff command against two databases, either the drivers for both must be in the $LIQUIBASE_HOME/lib directory or the classpath property must reference both JAR files. Use the appropriate path separator for your operating system: for Windows, use a semicolon; for Mac or Linux, use a colon.

$LIQUIBASE_HOME is an environment variable that points to the location of the directory where Liquibase is installed on your machine. You can set environment variables using your operating system's shell. The location of $LIQUIBASE_HOME will depend on where Liquibase was installed on your machine.

Example: classpath: ojdbc7.jar:postgresql-42.2.8.jar

Option 2:

Configure the Liquibase properties file to include the connection information for both databases. Then, run the following command in the CLI:

liquibase diff-changelog --changelog-file=example-changelog.xml

Note: If you specify a changelog file name that already exists, Liquibase will append your changes to the existing file.

Output

The diff-changelog command produces a list of all objects and creates a changelog with a list of changesets.

Liquibase Open Source diff-changelog categories:

  • Catalog

  • Column

  • Foreign Key

  • Index

  • Primary Key

  • Schema

  • Sequence

  • Unique Constraints

  • View

Console output example

Liquibase Version: 4.9.1 BEST PRACTICE: The changelog generated by diffChangeLog/generateChangeLog should be inspected for correctness and completeness before being deployed. Some database objects and their dependencies cannot be represented automatically, and they may need to be manually updated before being deployed. Liquibase command 'diff-changelog' was executed successfully.

Filtering diff-changelog types

You can filter what objects diff-changelog generates with the --diff-types attribute:

--diff-types=<catalogs,tables,functions,views,columns,indexes,foreignkeys,primarykeys,uniqueconstraints,storedprocedures,triggers,sequences,databasepackage,databasepackagebody>

You can also filter specific objects by name with the --include-objects and --exclude-objects attributes. For example:

--include-objects=table:tableName,column:columnName,view:viewName,index:indexName --exclude-objects=table:tableName,column:columnName,view:viewName,index:indexName

This way, you can prevent undesired objects from ending in the resulting changelog.

Additional Functionality with Liquibase Secure

While Liquibase Open Source stores all changesets in a changelog, Liquibase Secure creates a directory called Objects and places the directory at the same level as your changelog. The Objects directory contains a subdirectory for each of the following Stored Logic types:

  • checkconstraint

  • package

  • packagebody

  • procedure

  • function

  • trigger

  • synonyms

Note: Not all database platforms support all stored logic types that are listed.

The diff-changelog command structures stored logic files into timestamped directories every time you run the command.

Note: Liquibase does not currently check data type length.

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication. Also, you can specify database credentials as part of the url attribute.

Liquibase Secure diff-changelog example file

loading

Command parameters

Attribute

Definition

Requirement

--changelog-file=<string>

The root changelog

Required

--reference-url=<string>

The JDBC reference database connection URL

Required

--data-output-directory=<string>

Specifies a directory to send the loadData output to a CSV file which is generated by running the diff-changelog or generate-changelog command.

Optional

--url=<string>

The JDBC database connection URL.

Required

--author=<string>

Specifies the author for changesets in the generated changelog.

Optional

--context-filter=<string>

Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later.

Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run.

After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, update --context-filter=<xyz>.

Optional

--default-catalog-name=<string>

Name of the default catalog to use for the database connection

Optional

--default-schema-name=<string>

Name of the default schema to use for the database connection. If defaultSchemaName is set, then objects do not have to be fully qualified. This means you can refer to just mytable instead of myschema.mytable.

Note: In the properties file and JAVA_OPTS only: in 4.18.0 and earlier, specify this parameter using the syntax defaultSchemaName. In 4.19.0 and later, use the syntax liquibase.command.defaultSchemaName.

Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set --preserve-schema-case to true. However, in Liquibase 4.12.0–4.22.0, the Liquibase validator still throws a DatabaseException error if you specify a mixed-case value of defaultSchemaName. In 4.23.0 and later, the Liquibase validator accepts any casing.

Optional

--diff-types=<string>

Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: catalogs, checkconstraints, columns, compositetype, data, databasepackage, databasepackagebody, foreignkeys, functions, indexes, primarykeys, sequences, storedprocedures, tables, triggers, uniqueconstraints, views.

If null, default types are columns, foreignkeys, indexes, primarykeys, tables, uniqueconstraints, views.

Liquibase Secure 5.1.0+. Snowflake accepted values are: catalogs, checkconstraints, data, databasepackage, databasepackagebody, FileFormat, foreignkeys, functions, indexes, primarykeys, sequences, SnowflakeDynamicTable, SnowflakeDynamicTableColumn, SnowflakeStage, SnowflakeStandardTable, SnowflakeStandardTableColumn, SnowflakeView, SnowflakeViewColumn, storedprocedures, and triggers.

Note: For Snowflake, unique constraints are not snapshotted as standalone objects. Instead, uniqueness is captured as the isUnique attribute on the column definition.

Snowflake view and table support has been enhanced with four Snowflake-specific view and table objects: Snowflake standard views, Snowflake materialized views, Snowflake standard tables, and Snowflake dynamic tables. The generic Liquibase VIEW and TABLE objects are supported for backward compatibility in CRUD operations only and do not support database inspection. For full Snowflake functionality, use the Snowflake standard view, Snowflake standard table, and Snowflake dynamic table objects. The Snowflake materialized view objects support CRUD operations.

Note: The diff types checkconstraints, databasepackage, databasepackagebody, functions, storedprocedures, triggers, and Snowflake-specific values require Liquibase Secure.

Optional

--drift-severity=<string>

Specifies the severity level of all error types in the drift report (changed, missing, or unexpected content). Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. If both --drift-severity and one of the individual error type arguments are set, the individual error type arguments take priority. Default: INFO.

Optional

--drift-severity-changed=<string>

Specifies the severity level of changed content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for changed content only. Default: INFO.

Optional

--drift-severity-missing=<string>

Specifies the severity level of missing content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for missing content only. Default: INFO.

Optional

--drift-severity-unexpected=<string>

Specifies the severity level of unexpected content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for unexpected content only. Default: INFO.

Optional

--driver=<string>

The JDBC driver class

Optional

--driver-properties-file=<string>

The JDBC driver properties file

Optional

--exclude-objects=<string>

Objects to exclude from diff

Optional

--ignore-missing-references=[true|false]

Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys) Default: false

Optional

--include-catalog=<true|false>

If true, the catalog will be included in generated changesets. Default: false

Optional

--include-objects=<string>

Objects to include in diff

Optional

--include-schema=<true|false>

If true, the schema will be included in generated changesets. Default: false.

When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas.

Optional

--include-tablespace=<true|false>

Include the tablespace attribute in the changelog. Default: false

Optional

--label-filter=<string>

Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later.

Labels are tags you can add to changesets to control which changeset will be executed in any migration run.

After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, update --label-filter=<xyz>.

Optional

--object-changelogs=<string>

Generates a separate changelog for each object. Valid values: all (generate changelogs for all object types), table, view, dml, triggers, functions, sequences, storedprocedures, packages, packagebodies, checkconstraints, indexes, foreignkeys, primarykeys, uniqueconstraints, and none. Default: none.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

--output-schemas=<string>

Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match --schemas. If you have three items names in --schemas, you must also have three items in --output-schemas.

Example: liquibase generate-changelog --schemas=a,b,c --output-schemas=d,e,f

Optional

--password=<string>

Password to connect to the target database.

Optional

--reference-default-catalog-name=<string>

The reference default catalog name to use for the database connection

Optional

--reference-default-schema-name=<string>

The reference default schema name to use for the database connection

Optional

--reference-driver=<string>

The JDBC driver class for the reference database

Optional

--reference-driver-properties-file=<string>

The JDBC driver properties file for the reference database

Optional

--reference-liquibase-catalog-name=<string>

Reference database catalog to use for Liquibase objects. Liquibase 4.24.0+.

Optional

--reference-liquibase-schema-name=<string>

Reference database schema to use for Liquibase objects. Liquibase 4.24.0+.

Optional

--reference-password=<string>

The reference database password.

Optional

--reference-schemas=<string>

Schemas names on reference database to use in diff. This is a CSV list.

Optional

--reference-username=<string>

The reference database username.

Optional

--replace-if-exists-types=<string>

Specify Change Types you want to target. Liquibase sets replaceIfExists="true" on these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

--report-enabled=<true|false>

Enables a report at the command level. Overrides the global parameter --reports-enabled. Default: true.

Optional

--report-name=<string>

Specifies the name of the report file at the command level. Overrides the global parameter --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

--report-path=<string>

Specifies the file path to the report file at the command level. Overrides the global parameter --reports-path. Default: ./.

Optional

--report-suppress-exception=<true|false>

Liquibase 4.31.0+. Specifies whether to hide exceptions (which may contain SQL) from the operation report at the command level. Overrides the global parameter --reports-suppress-exception. Default: false. However:

If --report-suppress-exception is not set and --report-suppress-sql=true, Liquibase suppresses all SQL, including exception SQL.

If --report-suppress-exception=false and --report-suppress-sql=true, Liquibase suppresses most SQL but shows exception SQL.

Optional

--report-suppress-sql=<true|false>

Liquibase 4.31.0+. Specifies whether to hide changeset SQL in operation reports at the command level. Overridden by the global parameter --reports-suppress-sql. Default: false.

Optional

--run-on-change-types=<string>

Specify Change Types you want to target. Liquibase sets runOnChange="true" on changesets containing solely these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

--schemas=<string>

Schemas to include in diff

Optional

--skip-object-sorting=<true|false>

When true, skips Liquibase's dependency-based object ordering. By default, Liquibase 5.2 and later automatically orders changesets so they can be deployed without manual reordering.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

--username=<string>

Username to connect to the target database.

Optional

Attribute

Definition

Requirement

cmdArgs: { changelog-file: "<string>" }

The root changelog

Required

cmdArgs: { reference-url: "<string>" }

The JDBC reference database connection URL

Required

cmdArgs: { data-output-directory: "<string>" }

Specifies a directory to send the loadData output to a CSV file which is generated by running the diff-changelog or generate-changelog command.

Optional

cmdArgs: { url: "<string>" }

The JDBC database connection URL.

Required

cmdArgs: { author: "<string>" }

Specifies the author for changesets in the generated changelog.

Optional

cmdArgs: { context-filter: "<string>" }

Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later.

Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run.

After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, update --context-filter=<xyz>.

Optional

cmdArgs: { default-catalog-name: "<string>" }

Name of the default catalog to use for the database connection

Optional

cmdArgs: { default-schema-name: "<string>" }

Name of the default schema to use for the database connection. If defaultSchemaName is set, then objects do not have to be fully qualified. This means you can refer to just mytable instead of myschema.mytable.

Note: In the properties file and JAVA_OPTS only: in 4.18.0 and earlier, specify this parameter using the syntax defaultSchemaName. In 4.19.0 and later, use the syntax liquibase.command.defaultSchemaName.

Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set --preserve-schema-case to true. However, in Liquibase 4.12.0–4.22.0, the Liquibase validator still throws a DatabaseException error if you specify a mixed-case value of defaultSchemaName. In 4.23.0 and later, the Liquibase validator accepts any casing.

Optional

cmdArgs: { diff-types: "<string>" }

Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: catalogs, checkconstraints, columns, compositetype, data, databasepackage, databasepackagebody, foreignkeys, functions, indexes, primarykeys, sequences, storedprocedures, tables, triggers, uniqueconstraints, views.

If null, default types are columns, foreignkeys, indexes, primarykeys, tables, uniqueconstraints, views.

Liquibase Secure 5.1.0+. Snowflake accepted values are: catalogs, checkconstraints, data, databasepackage, databasepackagebody, FileFormat, foreignkeys, functions, indexes, primarykeys, sequences, SnowflakeDynamicTable, SnowflakeDynamicTableColumn, SnowflakeStage, SnowflakeStandardTable, SnowflakeStandardTableColumn, SnowflakeView, SnowflakeViewColumn, storedprocedures, and triggers.

Note: For Snowflake, unique constraints are not snapshotted as standalone objects. Instead, uniqueness is captured as the isUnique attribute on the column definition.

Snowflake view and table support has been enhanced with four Snowflake-specific view and table objects: Snowflake standard views, Snowflake materialized views, Snowflake standard tables, and Snowflake dynamic tables. The generic Liquibase VIEW and TABLE objects are supported for backward compatibility in CRUD operations only and do not support database inspection. For full Snowflake functionality, use the Snowflake standard view, Snowflake standard table, and Snowflake dynamic table objects. The Snowflake materialized view objects support CRUD operations.

Note: The diff types checkconstraints, databasepackage, databasepackagebody, functions, storedprocedures, triggers, and Snowflake-specific values require Liquibase Secure.

Optional

cmdArgs: { drift-severity: "<string>" }

Specifies the severity level of all error types in the drift report (changed, missing, or unexpected content). Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. If both --drift-severity and one of the individual error type arguments are set, the individual error type arguments take priority. Default: INFO.

Optional

cmdArgs: { drift-severity-changed: "<string>" }

Specifies the severity level of changed content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for changed content only. Default: INFO.

Optional

cmdArgs: { drift-severity-missing: "<string>" }

Specifies the severity level of missing content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for missing content only. Default: INFO.

Optional

cmdArgs: { drift-severity-unexpected: "<string>" }

Specifies the severity level of unexpected content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for unexpected content only. Default: INFO.

Optional

cmdArgs: { driver: "<string>" }

The JDBC driver class

Optional

cmdArgs: { driver-properties-file: "<string>" }

The JDBC driver properties file

Optional

cmdArgs: { exclude-objects: "<string>" }

Objects to exclude from diff

Optional

cmdArgs: { ignore-missing-references: "<true|false>" }

Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys) Default: false

Optional

cmdArgs: { include-catalog: "<true|false>" }

If true, the catalog will be included in generated changesets. Default: false

Optional

cmdArgs: { include-objects: "<string>" }

Objects to include in diff

Optional

cmdArgs: { include-schema: "<true|false>" }

If true, the schema will be included in generated changesets. Default: false.

When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas.

Optional

cmdArgs: { include-tablespace: "<true|false>" }

Include the tablespace attribute in the changelog. Default: false

Optional

cmdArgs: { label-filter: "<string>" }

Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later.

Labels are tags you can add to changesets to control which changeset will be executed in any migration run.

After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, update --label-filter=<xyz>.

Optional

cmdArgs: { object-changelogs: "<string>" }

Generates a separate changelog for each object. Valid values: all (generate changelogs for all object types), table, view, dml, triggers, functions, sequences, storedprocedures, packages, packagebodies, checkconstraints, indexes, foreignkeys, primarykeys, uniqueconstraints, and none. Default: none.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

cmdArgs: { output-schemas: "<string>" }

Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match --schemas. If you have three items names in --schemas, you must also have three items in --output-schemas.

Example: liquibase generate-changelog --schemas=a,b,c --output-schemas=d,e,f

Optional

cmdArgs: { password: "<string>" }

Password to connect to the target database.

Optional

cmdArgs: { reference-default-catalog-name: "<string>" }

The reference default catalog name to use for the database connection

Optional

cmdArgs: { reference-default-schema-name: "<string>" }

The reference default schema name to use for the database connection

Optional

cmdArgs: { reference-driver: "<string>" }

The JDBC driver class for the reference database

Optional

cmdArgs: { reference-driver-properties-file: "<string>" }

The JDBC driver properties file for the reference database

Optional

cmdArgs: { reference-liquibase-catalog-name: "<string>" }

Reference database catalog to use for Liquibase objects. Liquibase 4.24.0+.

Optional

cmdArgs: { reference-liquibase-schema-name: "<string>" }

Reference database schema to use for Liquibase objects. Liquibase 4.24.0+.

Optional

cmdArgs: { reference-password: "<string>" }

The reference database password.

Optional

cmdArgs: { reference-schemas: "<string>" }

Schemas names on reference database to use in diff. This is a CSV list.

Optional

cmdArgs: { reference-username: "<string>" }

The reference database username.

Optional

cmdArgs: { replace-if-exists-types: "<string>" }

Specify Change Types you want to target. Liquibase sets replaceIfExists="true" on these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

cmdArgs: { report-enabled: "<true|false>" }

Enables a report at the command level. Overrides the global parameter --reports-enabled. Default: true.

Optional

cmdArgs: { report-name: "<string>" }

Specifies the name of the report file at the command level. Overrides the global parameter --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

cmdArgs: { report-path: "<string>" }

Specifies the file path to the report file at the command level. Overrides the global parameter --reports-path. Default: ./.

Optional

cmdArgs: { report-suppress-exception: "<true|false>" }

Liquibase 4.31.0+. Specifies whether to hide exceptions (which may contain SQL) from the operation report at the command level. Overrides the global parameter --reports-suppress-exception. Default: false. However:

If --report-suppress-exception is not set and --report-suppress-sql=true, Liquibase suppresses all SQL, including exception SQL.

If --report-suppress-exception=false and --report-suppress-sql=true, Liquibase suppresses most SQL but shows exception SQL.

Optional

cmdArgs: { report-suppress-sql: "<true|false>" }

Liquibase 4.31.0+. Specifies whether to hide changeset SQL in operation reports at the command level. Overridden by the global parameter --reports-suppress-sql. Default: false.

Optional

cmdArgs: { run-on-change-types: "<string>" }

Specify Change Types you want to target. Liquibase sets runOnChange="true" on changesets containing solely these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

cmdArgs: { schemas: "<string>" }

Schemas to include in diff

Optional

cmdArgs: { skip-object-sorting: "<true|false>" }

When true, skips Liquibase's dependency-based object ordering. By default, Liquibase 5.2 and later automatically orders changesets so they can be deployed without manual reordering.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

cmdArgs: { username: "<string>" }

Username to connect to the target database.

Optional

Attribute

Definition

Requirement

liquibase.command.changelogFile: <string>

liquibase.command.diffChangelog.changelogFile: <string>

The root changelog

Required

liquibase.command.referenceUrl: <string>

liquibase.command.diffChangelog.referenceUrl: <string>

The JDBC reference database connection URL

Required

liquibase.command.dataOutputDirectory: <string>

liquibase.command.diffChangelog.dataOutputDirectory: <string>

Specifies a directory to send the loadData output to a CSV file which is generated by running the diff-changelog or generate-changelog command.

Optional

liquibase.command.url: <string>

liquibase.command.diffChangelog.url: <string>

The JDBC database connection URL.

Required

liquibase.command.author: <string>

liquibase.command.diffChangelog.author: <string>

Specifies the author for changesets in the generated changelog.

Optional

liquibase.command.contextFilter: <string>

liquibase.command.diffChangelog.contextFilter: <string>

Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later.

Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run.

After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, update --context-filter=<xyz>.

Optional

liquibase.command.defaultCatalogName: <string>

liquibase.command.diffChangelog.defaultCatalogName: <string>

Name of the default catalog to use for the database connection

Optional

liquibase.command.defaultSchemaName: <string>

liquibase.command.diffChangelog.defaultSchemaName: <string>

Name of the default schema to use for the database connection. If defaultSchemaName is set, then objects do not have to be fully qualified. This means you can refer to just mytable instead of myschema.mytable.

Note: In the properties file and JAVA_OPTS only: in 4.18.0 and earlier, specify this parameter using the syntax defaultSchemaName. In 4.19.0 and later, use the syntax liquibase.command.defaultSchemaName.

Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set --preserve-schema-case to true. However, in Liquibase 4.12.0–4.22.0, the Liquibase validator still throws a DatabaseException error if you specify a mixed-case value of defaultSchemaName. In 4.23.0 and later, the Liquibase validator accepts any casing.

Optional

liquibase.command.diffTypes: <string>

liquibase.command.diffChangelog.diffTypes: <string>

Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: catalogs, checkconstraints, columns, compositetype, data, databasepackage, databasepackagebody, foreignkeys, functions, indexes, primarykeys, sequences, storedprocedures, tables, triggers, uniqueconstraints, views.

If null, default types are columns, foreignkeys, indexes, primarykeys, tables, uniqueconstraints, views.

Liquibase Secure 5.1.0+. Snowflake accepted values are: catalogs, checkconstraints, data, databasepackage, databasepackagebody, FileFormat, foreignkeys, functions, indexes, primarykeys, sequences, SnowflakeDynamicTable, SnowflakeDynamicTableColumn, SnowflakeStage, SnowflakeStandardTable, SnowflakeStandardTableColumn, SnowflakeView, SnowflakeViewColumn, storedprocedures, and triggers.

Note: For Snowflake, unique constraints are not snapshotted as standalone objects. Instead, uniqueness is captured as the isUnique attribute on the column definition.

Snowflake view and table support has been enhanced with four Snowflake-specific view and table objects: Snowflake standard views, Snowflake materialized views, Snowflake standard tables, and Snowflake dynamic tables. The generic Liquibase VIEW and TABLE objects are supported for backward compatibility in CRUD operations only and do not support database inspection. For full Snowflake functionality, use the Snowflake standard view, Snowflake standard table, and Snowflake dynamic table objects. The Snowflake materialized view objects support CRUD operations.

Note: The diff types checkconstraints, databasepackage, databasepackagebody, functions, storedprocedures, triggers, and Snowflake-specific values require Liquibase Secure.

Optional

liquibase.command.driftSeverity: <string>

liquibase.command.diffChangelog.driftSeverity: <string>

Specifies the severity level of all error types in the drift report (changed, missing, or unexpected content). Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. If both --drift-severity and one of the individual error type arguments are set, the individual error type arguments take priority. Default: INFO.

Optional

liquibase.command.driftSeverityChanged: <string>

liquibase.command.diffChangelog.driftSeverityChanged: <string>

Specifies the severity level of changed content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for changed content only. Default: INFO.

Optional

liquibase.command.driftSeverityMissing: <string>

liquibase.command.diffChangelog.driftSeverityMissing: <string>

Specifies the severity level of missing content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for missing content only. Default: INFO.

Optional

liquibase.command.driftSeverityUnexpected: <string>

liquibase.command.diffChangelog.driftSeverityUnexpected: <string>

Specifies the severity level of unexpected content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for unexpected content only. Default: INFO.

Optional

liquibase.command.driver: <string>

liquibase.command.diffChangelog.driver: <string>

The JDBC driver class

Optional

liquibase.command.driverPropertiesFile: <string>

liquibase.command.diffChangelog.driverPropertiesFile: <string>

The JDBC driver properties file

Optional

liquibase.command.excludeObjects: <string>

liquibase.command.diffChangelog.excludeObjects: <string>

Objects to exclude from diff

Optional

liquibase.command.ignoreMissingReferences=[true|false] or liquibase.command.diff.ignoreMissingReferences=[true|false]

Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys) Default: false

Optional

liquibase.command.includeCatalog: <true|false>

liquibase.command.diffChangelog.includeCatalog: <true|false>

If true, the catalog will be included in generated changesets. Default: false

Optional

liquibase.command.includeObjects: <string>

liquibase.command.diffChangelog.includeObjects: <string>

Objects to include in diff

Optional

liquibase.command.includeSchema: <true|false>

liquibase.command.diffChangelog.includeSchema: <true|false>

If true, the schema will be included in generated changesets. Default: false.

When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas.

Optional

liquibase.command.includeTablespace: <true|false>

liquibase.command.diffChangelog.includeTablespace: <true|false>

Include the tablespace attribute in the changelog. Default: false

Optional

liquibase.command.labelFilter: <string>

liquibase.command.diffChangelog.labelFilter: <string>

Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later.

Labels are tags you can add to changesets to control which changeset will be executed in any migration run.

After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, update --label-filter=<xyz>.

Optional

liquibase.command.objectChangelogs: <string>

liquibase.command.diffChangelog.objectChangelogs: <string>

Generates a separate changelog for each object. Valid values: all (generate changelogs for all object types), table, view, dml, triggers, functions, sequences, storedprocedures, packages, packagebodies, checkconstraints, indexes, foreignkeys, primarykeys, uniqueconstraints, and none. Default: none.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

liquibase.command.outputSchemas: <string>

liquibase.command.diffChangelog.outputSchemas: <string>

Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match --schemas. If you have three items names in --schemas, you must also have three items in --output-schemas.

Example: liquibase generate-changelog --schemas=a,b,c --output-schemas=d,e,f

Optional

liquibase.command.password: <string>

liquibase.command.diffChangelog.password: <string>

Password to connect to the target database.

Optional

liquibase.command.preserveNullValues: <string>

liquibase.command.diffChangelog.preserveNullValues: <string>

If true, column nodes will be created with null values. For example:

<insert schemaName="public" tableName="liquibase_rules">

<column name="a" value="AA" />

<column name="b" value="null" />

<column name="c" value="null" />

</insert>

If false, null values will be ignored. For example:

<insert schemaName="public" tableName="liquibase_rules">

<column name="a" value="AA" />

</insert>

Optional

liquibase.command.referenceDefaultCatalogName: <string>

liquibase.command.diffChangelog.referenceDefaultCatalogName: <string>

The reference default catalog name to use for the database connection

Optional

liquibase.command.referenceDefaultSchemaName: <string>

liquibase.command.diffChangelog.referenceDefaultSchemaName: <string>

The reference default schema name to use for the database connection

Optional

liquibase.command.referenceDriver: <string>

liquibase.command.diffChangelog.referenceDriver: <string>

The JDBC driver class for the reference database

Optional

liquibase.command.referenceDriverPropertiesFile: <string>

liquibase.command.diffChangelog.referenceDriverPropertiesFile: <string>

The JDBC driver properties file for the reference database

Optional

liquibase.command.referenceLiquibaseCatalogName: <string>

liquibase.command.diffChangelog.referenceLiquibaseCatalogName: <string>

Reference database catalog to use for Liquibase objects. Liquibase 4.24.0+.

Optional

liquibase.command.referenceLiquibaseSchemaName: <string>

liquibase.command.diffChangelog.referenceLiquibaseSchemaName: <string>

Reference database schema to use for Liquibase objects. Liquibase 4.24.0+.

Optional

liquibase.command.referencePassword: <string>

liquibase.command.diffChangelog.referencePassword: <string>

The reference database password.

Optional

liquibase.command.referenceSchemas: <string>

liquibase.command.diffChangelog.referenceSchemas: <string>

Schemas names on reference database to use in diff. This is a CSV list.

Optional

liquibase.command.referenceUsername: <string>

liquibase.command.diffChangelog.referenceUsername: <string>

The reference database username.

Optional

liquibase.command.replaceIfExistsTypes: <string>

liquibase.command.diffChangelog.replaceIfExistsTypes: <string>

Specify Change Types you want to target. Liquibase sets replaceIfExists="true" on these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

liquibase.command.reportEnabled: <true|false>

liquibase.command.diffChangelog.reportEnabled: <true|false>

Enables a report at the command level. Overrides the global parameter --reports-enabled. Default: true.

Optional

liquibase.command.reportName: <string>

liquibase.command.diffChangelog.reportName: <string>

Specifies the name of the report file at the command level. Overrides the global parameter --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

liquibase.command.reportPath: <string>

liquibase.command.diffChangelog.reportPath: <string>

Specifies the file path to the report file at the command level. Overrides the global parameter --reports-path. Default: ./.

Optional

liquibase.command.reportSuppressException: <true|false>

liquibase.command.diffChangelog.reportSuppressException: <true|false>

Liquibase 4.31.0+. Specifies whether to hide exceptions (which may contain SQL) from the operation report at the command level. Overrides the global parameter --reports-suppress-exception. Default: false. However:

If --report-suppress-exception is not set and --report-suppress-sql=true, Liquibase suppresses all SQL, including exception SQL.

If --report-suppress-exception=false and --report-suppress-sql=true, Liquibase suppresses most SQL but shows exception SQL.

Optional

liquibase.command.reportSuppressSql: <true|false>

liquibase.command.diffChangelog.reportSuppressSql: <true|false>

Liquibase 4.31.0+. Specifies whether to hide changeset SQL in operation reports at the command level. Overridden by the global parameter --reports-suppress-sql. Default: false.

Optional

liquibase.command.runOnChangeTypes: <string>

liquibase.command.diffChangelog.runOnChangeTypes: <string>

Specify Change Types you want to target. Liquibase sets runOnChange="true" on changesets containing solely these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

liquibase.command.schemas: <string>

liquibase.command.diffChangelog.schemas: <string>

Schemas to include in diff

Optional

liquibase.command.skipObjectSorting: <true|false>

liquibase.command.diffChangelog.skipObjectSorting: <true|false>

When true, skips Liquibase's dependency-based object ordering. By default, Liquibase 5.2 and later automatically orders changesets so they can be deployed without manual reordering.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

liquibase.command.username: <string>

liquibase.command.diffChangelog.username: <string>

Username to connect to the target database.

Optional

Attribute

Definition

Requirement

JAVA_OPTS=-Dliquibase.command.changelogFile=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.changelogFile=<string>

The root changelog

Required

JAVA_OPTS=-Dliquibase.command.referenceUrl=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceUrl=<string>

The JDBC reference database connection URL

Required

JAVA_OPTS=-Dliquibase.command.dataOutputDirectory=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.dataOutputDirectory=<string>

Specifies a directory to send the loadData output to a CSV file which is generated by running the diff-changelog or generate-changelog command.

Optional

JAVA_OPTS=-Dliquibase.command.url=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.url=<string>

The JDBC database connection URL.

Required

JAVA_OPTS=-Dliquibase.command.author=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.author=<string>

Specifies the author for changesets in the generated changelog.

Optional

JAVA_OPTS=-Dliquibase.command.contextFilter=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.contextFilter=<string>

Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later.

Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run.

After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, update --context-filter=<xyz>.

Optional

JAVA_OPTS=-Dliquibase.command.defaultCatalogName=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.defaultCatalogName=<string>

Name of the default catalog to use for the database connection

Optional

JAVA_OPTS=-Dliquibase.command.defaultSchemaName=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.defaultSchemaName=<string>

Name of the default schema to use for the database connection. If defaultSchemaName is set, then objects do not have to be fully qualified. This means you can refer to just mytable instead of myschema.mytable.

Note: In the properties file and JAVA_OPTS only: in 4.18.0 and earlier, specify this parameter using the syntax defaultSchemaName. In 4.19.0 and later, use the syntax liquibase.command.defaultSchemaName.

Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set --preserve-schema-case to true. However, in Liquibase 4.12.0–4.22.0, the Liquibase validator still throws a DatabaseException error if you specify a mixed-case value of defaultSchemaName. In 4.23.0 and later, the Liquibase validator accepts any casing.

Optional

JAVA_OPTS=-Dliquibase.command.diffTypes=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.diffTypes=<string>

Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: catalogs, checkconstraints, columns, compositetype, data, databasepackage, databasepackagebody, foreignkeys, functions, indexes, primarykeys, sequences, storedprocedures, tables, triggers, uniqueconstraints, views.

If null, default types are columns, foreignkeys, indexes, primarykeys, tables, uniqueconstraints, views.

Liquibase Secure 5.1.0+. Snowflake accepted values are: catalogs, checkconstraints, data, databasepackage, databasepackagebody, FileFormat, foreignkeys, functions, indexes, primarykeys, sequences, SnowflakeDynamicTable, SnowflakeDynamicTableColumn, SnowflakeStage, SnowflakeStandardTable, SnowflakeStandardTableColumn, SnowflakeView, SnowflakeViewColumn, storedprocedures, and triggers.

Note: For Snowflake, unique constraints are not snapshotted as standalone objects. Instead, uniqueness is captured as the isUnique attribute on the column definition.

Snowflake view and table support has been enhanced with four Snowflake-specific view and table objects: Snowflake standard views, Snowflake materialized views, Snowflake standard tables, and Snowflake dynamic tables. The generic Liquibase VIEW and TABLE objects are supported for backward compatibility in CRUD operations only and do not support database inspection. For full Snowflake functionality, use the Snowflake standard view, Snowflake standard table, and Snowflake dynamic table objects. The Snowflake materialized view objects support CRUD operations.

Note: The diff types checkconstraints, databasepackage, databasepackagebody, functions, storedprocedures, triggers, and Snowflake-specific values require Liquibase Secure.

Optional

JAVA_OPTS=-Dliquibase.command.driftSeverity=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.driftSeverity=<string>

Specifies the severity level of all error types in the drift report (changed, missing, or unexpected content). Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. If both --drift-severity and one of the individual error type arguments are set, the individual error type arguments take priority. Default: INFO.

Optional

JAVA_OPTS=-Dliquibase.command.driftSeverityChanged=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.driftSeverityChanged=<string>

Specifies the severity level of changed content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for changed content only. Default: INFO.

Optional

JAVA_OPTS=-Dliquibase.command.driftSeverityMissing=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.driftSeverityMissing=<string>

Specifies the severity level of missing content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for missing content only. Default: INFO.

Optional

JAVA_OPTS=-Dliquibase.command.driftSeverityUnexpected=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.driftSeverityUnexpected=<string>

Specifies the severity level of unexpected content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for unexpected content only. Default: INFO.

Optional

JAVA_OPTS=-Dliquibase.command.driver=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.driver=<string>

The JDBC driver class

Optional

JAVA_OPTS=-Dliquibase.command.driverPropertiesFile=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.driverPropertiesFile=<string>

The JDBC driver properties file

Optional

JAVA_OPTS=-Dliquibase.command.excludeObjects=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.excludeObjects=<string>

Objects to exclude from diff

Optional

Unix Dliquibase.ignoreMissingReferences=[true|false] Windows D"liquibase.ignoreMissingReferences"=[true|false]

Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys) Default: false

Optional

JAVA_OPTS=-Dliquibase.command.includeCatalog=<true|false>

JAVA_OPTS=-Dliquibase.command.diffChangelog.includeCatalog=<true|false>

If true, the catalog will be included in generated changesets. Default: false

Optional

JAVA_OPTS=-Dliquibase.command.includeObjects=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.includeObjects=<string>

Objects to include in diff

Optional

JAVA_OPTS=-Dliquibase.command.includeSchema=<true|false>

JAVA_OPTS=-Dliquibase.command.diffChangelog.includeSchema=<true|false>

If true, the schema will be included in generated changesets. Default: false.

When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas.

Optional

JAVA_OPTS=-Dliquibase.command.includeTablespace=<true|false>

JAVA_OPTS=-Dliquibase.command.diffChangelog.includeTablespace=<true|false>

Include the tablespace attribute in the changelog. Default: false

Optional

JAVA_OPTS=-Dliquibase.command.labelFilter=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.labelFilter=<string>

Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later.

Labels are tags you can add to changesets to control which changeset will be executed in any migration run.

After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, update --label-filter=<xyz>.

Optional

JAVA_OPTS=-Dliquibase.command.objectChangelogs=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.objectChangelogs=<string>

Generates a separate changelog for each object. Valid values: all (generate changelogs for all object types), table, view, dml, triggers, functions, sequences, storedprocedures, packages, packagebodies, checkconstraints, indexes, foreignkeys, primarykeys, uniqueconstraints, and none. Default: none.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

JAVA_OPTS=-Dliquibase.command.outputSchemas=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.outputSchemas=<string>

Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match --schemas. If you have three items names in --schemas, you must also have three items in --output-schemas.

Example: liquibase generate-changelog --schemas=a,b,c --output-schemas=d,e,f

Optional

JAVA_OPTS=-Dliquibase.command.password=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.password=<string>

Password to connect to the target database.

Optional

JAVA_OPTS=-Dliquibase.command.preserveNullValues=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.preserveNullValues=<string>

If true, column nodes will be created with null values. For example:

<insert schemaName="public" tableName="liquibase_rules">

<column name="a" value="AA" />

<column name="b" value="null" />

<column name="c" value="null" />

</insert>

If false, null values will be ignored. For example:

<insert schemaName="public" tableName="liquibase_rules">

<column name="a" value="AA" />

</insert>

Optional

JAVA_OPTS=-Dliquibase.command.referenceDefaultCatalogName=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceDefaultCatalogName=<string>

The reference default catalog name to use for the database connection

Optional

JAVA_OPTS=-Dliquibase.command.referenceDefaultSchemaName=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceDefaultSchemaName=<string>

The reference default schema name to use for the database connection

Optional

JAVA_OPTS=-Dliquibase.command.referenceDriver=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceDriver=<string>

The JDBC driver class for the reference database

Optional

JAVA_OPTS=-Dliquibase.command.referenceDriverPropertiesFile=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceDriverPropertiesFile=<string>

The JDBC driver properties file for the reference database

Optional

JAVA_OPTS=-Dliquibase.command.referenceLiquibaseCatalogName=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceLiquibaseCatalogName=<string>

Reference database catalog to use for Liquibase objects. Liquibase 4.24.0+.

Optional

JAVA_OPTS=-Dliquibase.command.referenceLiquibaseSchemaName=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceLiquibaseSchemaName=<string>

Reference database schema to use for Liquibase objects. Liquibase 4.24.0+.

Optional

JAVA_OPTS=-Dliquibase.command.referencePassword=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referencePassword=<string>

The reference database password.

Optional

JAVA_OPTS=-Dliquibase.command.referenceSchemas=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceSchemas=<string>

Schemas names on reference database to use in diff. This is a CSV list.

Optional

JAVA_OPTS=-Dliquibase.command.referenceUsername=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.referenceUsername=<string>

The reference database username.

Optional

JAVA_OPTS=-Dliquibase.command.replaceIfExistsTypes=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.replaceIfExistsTypes=<string>

Specify Change Types you want to target. Liquibase sets replaceIfExists="true" on these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

JAVA_OPTS=-Dliquibase.command.reportEnabled=<true|false>

JAVA_OPTS=-Dliquibase.command.diffChangelog.reportEnabled=<true|false>

Enables a report at the command level. Overrides the global parameter --reports-enabled. Default: true.

Optional

JAVA_OPTS=-Dliquibase.command.reportName=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.reportName=<string>

Specifies the name of the report file at the command level. Overrides the global parameter --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

JAVA_OPTS=-Dliquibase.command.reportPath=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.reportPath=<string>

Specifies the file path to the report file at the command level. Overrides the global parameter --reports-path. Default: ./.

Optional

JAVA_OPTS=-Dliquibase.command.reportSuppressException=<true|false>

JAVA_OPTS=-Dliquibase.command.diffChangelog.reportSuppressException=<true|false>

Liquibase 4.31.0+. Specifies whether to hide exceptions (which may contain SQL) from the operation report at the command level. Overrides the global parameter --reports-suppress-exception. Default: false. However:

If --report-suppress-exception is not set and --report-suppress-sql=true, Liquibase suppresses all SQL, including exception SQL.

If --report-suppress-exception=false and --report-suppress-sql=true, Liquibase suppresses most SQL but shows exception SQL.

Optional

JAVA_OPTS=-Dliquibase.command.reportSuppressSql=<true|false>

JAVA_OPTS=-Dliquibase.command.diffChangelog.reportSuppressSql=<true|false>

Liquibase 4.31.0+. Specifies whether to hide changeset SQL in operation reports at the command level. Overridden by the global parameter --reports-suppress-sql. Default: false.

Optional

JAVA_OPTS=-Dliquibase.command.runOnChangeTypes=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.runOnChangeTypes=<string>

Specify Change Types you want to target. Liquibase sets runOnChange="true" on changesets containing solely these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

JAVA_OPTS=-Dliquibase.command.schemas=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.schemas=<string>

Schemas to include in diff

Optional

JAVA_OPTS=-Dliquibase.command.skipObjectSorting=<true|false>

JAVA_OPTS=-Dliquibase.command.diffChangelog.skipObjectSorting=<true|false>

When true, skips Liquibase's dependency-based object ordering. By default, Liquibase 5.2 and later automatically orders changesets so they can be deployed without manual reordering.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

Unix: JAVA_OPTS=-Doracle.jdbc.useFetchSizeWithLongColumn=<true|false>

Windows: JAVA_OPTS=-D"Doracle.jdbc.useFetchSizeWithLongColumn"=<true|false>

Liquibase Secure 5.1+ This is a JVM system property that controls how the Oracle JDBC driver handles fetch sizes when querying tables containing LONG or LONG RAW columns. It is available in Liquibase 5.1.0 and later. The default value istrue, which enables optimized batch fetching for improved performance on Oracle databases. You can set this property tofalseif you need more controlled memory usage when working with large LONG or LONG RAW data types. Uses

You might want to set this property tofalsein scenarios where: Memory constraints Your environment has limited memory resources and you need more controlled fetching to prevent the driver from eagerly loading large amounts of data Large LONG/LONG RAW data You're working with very large LONG or LONG RAW data types and need to manage how data is fetched to avoid memory issues Resource management Your application requires fine-grained control over memory usage when processing large-scale data

Optional

JAVA_OPTS=-Dliquibase.command.username=<string>

JAVA_OPTS=-Dliquibase.command.diffChangelog.username=<string>

Username to connect to the target database.

Optional

Attribute

Definition

Requirement

LIQUIBASE_COMMAND_CHANGELOG_FILE=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_CHANGELOG_FILE=<string>

The root changelog

Required

LIQUIBASE_COMMAND_REFERENCE_URL=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_URL=<string>

The JDBC reference database connection URL

Required

LIQUIBASE_COMMAND_DATA_OUTPUT_DIRECTORY=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DATA_OUTPUT_DIRECTORY=<string>

Specifies a directory to send the loadData output to a CSV file which is generated by running the diff-changelog or generate-changelog command.

Optional

LIQUIBASE_COMMAND_URL=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_URL=<string>

The JDBC database connection URL.

Required

LIQUIBASE_COMMAND_AUTHOR=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_AUTHOR=<string>

Specifies the author for changesets in the generated changelog.

Optional

LIQUIBASE_COMMAND_CONTEXT_FILTER=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_CONTEXT_FILTER=<string>

Specifies the context filter to generate and apply to all changesets in your changelog. Useful to set many contexts quickly. Similar to the set-contexts command. Available in Liquibase 4.24.0 and later.

Contexts are tags you can add to changesets to control which changesets will be executed in any particular migration run.

After generating changesets with contexts, to deploy specific changes according to these contexts, you must run a command that specifies a context filter. For example, update --context-filter=<xyz>.

Optional

LIQUIBASE_COMMAND_DEFAULT_CATALOG_NAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DEFAULT_CATALOG_NAME=<string>

Name of the default catalog to use for the database connection

Optional

LIQUIBASE_COMMAND_DEFAULT_SCHEMA_NAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DEFAULT_SCHEMA_NAME=<string>

Name of the default schema to use for the database connection. If defaultSchemaName is set, then objects do not have to be fully qualified. This means you can refer to just mytable instead of myschema.mytable.

Note: In the properties file and JAVA_OPTS only: in 4.18.0 and earlier, specify this parameter using the syntax defaultSchemaName. In 4.19.0 and later, use the syntax liquibase.command.defaultSchemaName.

Note: In Liquibase 4.12.0 and later, you can use mixed-case schema names if you set --preserve-schema-case to true. However, in Liquibase 4.12.0–4.22.0, the Liquibase validator still throws a DatabaseException error if you specify a mixed-case value of defaultSchemaName. In 4.23.0 and later, the Liquibase validator accepts any casing.

Optional

LIQUIBASE_COMMAND_DIFF_TYPES=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DIFF_TYPES=<string>

Specifies the types of objects to compare. Specify multiple values as a comma-separated list (without spaces). Valid values are: catalogs, checkconstraints, columns, compositetype, data, databasepackage, databasepackagebody, foreignkeys, functions, indexes, primarykeys, sequences, storedprocedures, tables, triggers, uniqueconstraints, views.

If null, default types are columns, foreignkeys, indexes, primarykeys, tables, uniqueconstraints, views.

Liquibase Secure 5.1.0+. Snowflake accepted values are: catalogs, checkconstraints, data, databasepackage, databasepackagebody, FileFormat, foreignkeys, functions, indexes, primarykeys, sequences, SnowflakeDynamicTable, SnowflakeDynamicTableColumn, SnowflakeStage, SnowflakeStandardTable, SnowflakeStandardTableColumn, SnowflakeView, SnowflakeViewColumn, storedprocedures, and triggers.

Note: For Snowflake, unique constraints are not snapshotted as standalone objects. Instead, uniqueness is captured as the isUnique attribute on the column definition.

Snowflake view and table support has been enhanced with four Snowflake-specific view and table objects: Snowflake standard views, Snowflake materialized views, Snowflake standard tables, and Snowflake dynamic tables. The generic Liquibase VIEW and TABLE objects are supported for backward compatibility in CRUD operations only and do not support database inspection. For full Snowflake functionality, use the Snowflake standard view, Snowflake standard table, and Snowflake dynamic table objects. The Snowflake materialized view objects support CRUD operations.

Note: The diff types checkconstraints, databasepackage, databasepackagebody, functions, storedprocedures, triggers, and Snowflake-specific values require Liquibase Secure.

Optional

LIQUIBASE_COMMAND_DRIFT_SEVERITY=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DRIFT_SEVERITY=<string>

Specifies the severity level of all error types in the drift report (changed, missing, or unexpected content). Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. If both --drift-severity and one of the individual error type arguments are set, the individual error type arguments take priority. Default: INFO.

Optional

LIQUIBASE_COMMAND_DRIFT_SEVERITY_CHANGED=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DRIFT_SEVERITY_CHANGED=<string>

Specifies the severity level of changed content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for changed content only. Default: INFO.

Optional

LIQUIBASE_COMMAND_DRIFT_SEVERITY_MISSING=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DRIFT_SEVERITY_MISSING=<string>

Specifies the severity level of missing content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for missing content only. Default: INFO.

Optional

LIQUIBASE_COMMAND_DRIFT_SEVERITY_UNEXPECTED=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DRIFT_SEVERITY_UNEXPECTED=<string>

Specifies the severity level of unexpected content in the drift report. Valid values are INFO (0), MINOR (1), MAJOR (2), CRITICAL (3), and BLOCKER (4), from least severe to most severe. Overrides the value of --drift-severity for unexpected content only. Default: INFO.

Optional

LIQUIBASE_COMMAND_DRIVER=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DRIVER=<string>

The JDBC driver class

Optional

LIQUIBASE_COMMAND_DRIVER_PROPERTIES_FILE=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_DRIVER_PROPERTIES_FILE=<string>

The JDBC driver properties file

Optional

LIQUIBASE_COMMAND_EXCLUDE_OBJECTS=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_EXCLUDE_OBJECTS=<string>

Objects to exclude from diff

Optional

LIQUIBASE_COMMAND_IGNORE_MISSING_REFERENCES=[true|false]

Controls behavior when snapshots reference objects from schemas not included in the snapshot (like cross-schema triggers or foreign keys) Default: false

Optional

LIQUIBASE_COMMAND_INCLUDE_CATALOG=<true|false>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_INCLUDE_CATALOG=<true|false>

If true, the catalog will be included in generated changesets. Default: false

Optional

LIQUIBASE_COMMAND_INCLUDE_OBJECTS=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_INCLUDE_OBJECTS=<string>

Objects to include in diff

Optional

LIQUIBASE_COMMAND_INCLUDE_SCHEMA=<true|false>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_INCLUDE_SCHEMA=<true|false>

If true, the schema will be included in generated changesets. Default: false.

When specifying multiple schemas see Diff multiple schemas in Liquibase for file path considerations when same-named objects exist across schemas.

Optional

LIQUIBASE_COMMAND_INCLUDE_TABLESPACE=<true|false>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_INCLUDE_TABLESPACE=<true|false>

Include the tablespace attribute in the changelog. Default: false

Optional

LIQUIBASE_COMMAND_LABEL_FILTER=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_LABEL_FILTER=<string>

Specifies the label filter to generate and apply to all changesets in your changelog. Useful to set many labels quickly. Similar to the set-labels command. Available in Liquibase 4.24.0 and later.

Labels are tags you can add to changesets to control which changeset will be executed in any migration run.

After generating changesets with labels, to deploy specific changes according to these labels, you must run a command that specifies a label filter. For example, update --label-filter=<xyz>.

Optional

LIQUIBASE_COMMAND_OBJECT_CHANGELOGS=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_OBJECT_CHANGELOGS=<string>

Generates a separate changelog for each object. Valid values: all (generate changelogs for all object types), table, view, dml, triggers, functions, sequences, storedprocedures, packages, packagebodies, checkconstraints, indexes, foreignkeys, primarykeys, uniqueconstraints, and none. Default: none.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

LIQUIBASE_COMMAND_OUTPUT_SCHEMAS=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_OUTPUT_SCHEMAS=<string>

Lets you replace the schemas in the output changelog. This is a CSV list. The parameter size must match --schemas. If you have three items names in --schemas, you must also have three items in --output-schemas.

Example: liquibase generate-changelog --schemas=a,b,c --output-schemas=d,e,f

Optional

LIQUIBASE_COMMAND_PASSWORD=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_PASSWORD=<string>

Password to connect to the target database.

Optional

LIQUIBASE_COMMAND_PRESERVE_NULL_VALUES=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_PRESERVE_NULL_VALUES=<string>

If true, column nodes will be created with null values. For example:

<insert schemaName="public" tableName="liquibase_rules">

<column name="a" value="AA" />

<column name="b" value="null" />

<column name="c" value="null" />

</insert>

If false, null values will be ignored. For example:

<insert schemaName="public" tableName="liquibase_rules">

<column name="a" value="AA" />

</insert>

Optional

LIQUIBASE_COMMAND_REFERENCE_DEFAULT_CATALOG_NAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_DEFAULT_CATALOG_NAME=<string>

The reference default catalog name to use for the database connection

Optional

LIQUIBASE_COMMAND_REFERENCE_DEFAULT_SCHEMA_NAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_DEFAULT_SCHEMA_NAME=<string>

The reference default schema name to use for the database connection

Optional

LIQUIBASE_COMMAND_REFERENCE_DRIVER=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_DRIVER=<string>

The JDBC driver class for the reference database

Optional

LIQUIBASE_COMMAND_REFERENCE_DRIVER_PROPERTIES_FILE=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_DRIVER_PROPERTIES_FILE=<string>

The JDBC driver properties file for the reference database

Optional

LIQUIBASE_COMMAND_REFERENCE_LIQUIBASE_CATALOG_NAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_LIQUIBASE_CATALOG_NAME=<string>

Reference database catalog to use for Liquibase objects. Liquibase 4.24.0+.

Optional

LIQUIBASE_COMMAND_REFERENCE_LIQUIBASE_SCHEMA_NAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_LIQUIBASE_SCHEMA_NAME=<string>

Reference database schema to use for Liquibase objects. Liquibase 4.24.0+.

Optional

LIQUIBASE_COMMAND_REFERENCE_PASSWORD=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_PASSWORD=<string>

The reference database password.

Optional

LIQUIBASE_COMMAND_REFERENCE_SCHEMAS=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_SCHEMAS=<string>

Schemas names on reference database to use in diff. This is a CSV list.

Optional

LIQUIBASE_COMMAND_REFERENCE_USERNAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REFERENCE_USERNAME=<string>

The reference database username.

Optional

LIQUIBASE_COMMAND_REPLACE_IF_EXISTS_TYPES=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REPLACE_IF_EXISTS_TYPES=<string>

Specify Change Types you want to target. Liquibase sets replaceIfExists="true" on these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

LIQUIBASE_COMMAND_REPORT_ENABLED=<true|false>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REPORT_ENABLED=<true|false>

Enables a report at the command level. Overrides the global parameter --reports-enabled. Default: true.

Optional

LIQUIBASE_COMMAND_REPORT_NAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REPORT_NAME=<string>

Specifies the name of the report file at the command level. Overrides the global parameter --reports-name. By default, Liquibase generates a new report file labeled with a timestamp (user's local time). If you set a custom name, Liquibase overwrites the existing file every time you generate a new report. Default: report-<DD-Mon-YYYY-HHmmss>.html.

Optional

LIQUIBASE_COMMAND_REPORT_PATH=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REPORT_PATH=<string>

Specifies the file path to the report file at the command level. Overrides the global parameter --reports-path. Default: ./.

Optional

LIQUIBASE_COMMAND_REPORT_SUPPRESS_EXCEPTION=<true|false>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REPORT_SUPPRESS_EXCEPTION=<true|false>

Liquibase 4.31.0+. Specifies whether to hide exceptions (which may contain SQL) from the operation report at the command level. Overrides the global parameter --reports-suppress-exception. Default: false. However:

If --report-suppress-exception is not set and --report-suppress-sql=true, Liquibase suppresses all SQL, including exception SQL.

If --report-suppress-exception=false and --report-suppress-sql=true, Liquibase suppresses most SQL but shows exception SQL.

Optional

LIQUIBASE_COMMAND_REPORT_SUPPRESS_SQL=<true|false>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_REPORT_SUPPRESS_SQL=<true|false>

Liquibase 4.31.0+. Specifies whether to hide changeset SQL in operation reports at the command level. Overridden by the global parameter --reports-suppress-sql. Default: false.

Optional

LIQUIBASE_COMMAND_RUN_ON_CHANGE_TYPES=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_RUN_ON_CHANGE_TYPES=<string>

Specify Change Types you want to target. Liquibase sets runOnChange="true" on changesets containing solely these Change Types: createFunction, createPackage, createPackageBody, createProcedure, createTrigger, and createView. Liquibase 4.26.0+. Default: <none>.

Optional

LIQUIBASE_COMMAND_SCHEMAS=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_SCHEMAS=<string>

Schemas to include in diff

Optional

LIQUIBASE_COMMAND_SKIP_OBJECT_SORTING=<true|false>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_SKIP_OBJECT_SORTING=<true|false>

When true, skips Liquibase's dependency-based object ordering. By default, Liquibase 5.2 and later automatically orders changesets so they can be deployed without manual reordering.

Supported for: Oracle, Postgres, SQL Server, MySQL, MariaDB, DB2, Snowflake, Databricks, MongoDB, and BigQuery.

Optional

LIQUIBASE_COMMAND_USERNAME=<string>

LIQUIBASE_COMMAND_DIFF_CHANGELOG_USERNAME=<string>

Username to connect to the target database.

Optional

Drift report

In Liquibase 4.25.1 and later, you can automatically generate a Drift Report using the diff-changelog command. The drift report requires a Liquibase Secure license key.