include-relations-for-computed-columns

--include-relations-for-computed-columns is a global Boolean parameter that specifies whether Liquibase commands like diff and snapshot preserve the parent relationship for computed columns. The default value is false. This parameter is available in Liquibase 4.25.0 and later. This argument is only applicable to Microsoft SQL Server and Oracle.

Uses

A computed column in a table uses data from other columns to calculate its value. These are the computed column's "parent" columns. Liquibase commands like diff and snapshot create a snapshot of your database, including any computed columns.

By default, the snapshot that Liquibase generates on databases like Microsoft SQL Server and Oracle does not associate computed columns with the objects (parent columns) it uses to determine its values. This means that Liquibase may incorrectly detect unexpected columns when you run snapshot-dependent commands.

If you need your computed columns to retain their object relationships in the snapshot, you can set --include-relations-for-computed-columns to true. Otherwise, leave it at its default value of false.

Syntax

You can set this parameter in the following ways:

Option Syntax
Liquibase properties file (defaults file)
liquibase.includeRelationsForComputedColumns: <true|false>
Global flow file argument (example)
stages:
  Default:
    actions:
      - type: liquibase
        command: diff
        globalArgs: { include-relations-for-computed-columns: "<true|false>" }
Global CLI parameter
liquibase
 --include-relations-for-computed-columns=<true|false> diff
 --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.includeRelationsForComputedColumns=<true|false>
Liquibase Environment Variables
LIQUIBASE_INCLUDE_RELATIONS_FOR_COMPUTED_COLUMNS=<true|false>

For more information, see Working with Command Parameters.