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) |
|
Global flow file argument (example) |
|
Global CLI parameter |
|
JVM system property (JAVA_OPTS Environment Variable) |
|
Liquibase Environment Variables |
|
For more information, see Working with Command Parameters.