diff-column-default-value-constraint-name

Last updated: June 9, 2026

The diff-column-default-value-constraint-name global parameter is a Boolean that controls whether Liquibase includes auto-generated constraint names on column default values when comparing databases using the diff command or diff-changelog command. The default value is true.

Default value constraint names

Some databases, including Microsoft SQL Server, automatically create a named constraint whenever you define a default value on a column. If SQL Server doesn’t receive an explicit name, it generates one based on the table and column names (for example, DF__MyTable__MyCol__6A30C649). Because the generated name includes a hash-based suffix, the same schema deployed independently on two databases will produce different constraint names.

When Liquibase compares databases, it treats these differently named constraints as differences even though the default values are identical. This creates false positives in diff and diff-changelog output.

Uses

Setting diff-column-default-value-constraint-name to false ignores the auto-generated constraint name during column comparison. The default value itself, type, and other column attributes are still compared as usual. This is useful when:

  • You are comparing databases where the same schema was deployed independently, and auto-generated constraint names differ.

  • You want diff-changelog output that focuses on meaningful schema differences rather than on artifact names.

Leave the parameter at its default value of true if constraint names are meaningful in your environment, or if you want Liquibase to track them as part of schema state.

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file

liquibase.diffColumnDefaultValueConstraintName: <true|false>

Global flow file argument

globalArgs: { diff-column-default-value-constraint-name: "[true|false]" }

Global CLI parameter

liquibase --diff-column-default-value-constraint-name=<true|false> diff --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.diffColumnDefaultValueConstraintName=<true|false>

Windows:

JAVA_OPTS=-D"liquibase.diffColumnDefaultValueConstraintName"=<true|false>

Liquibase environment variable

LIQUIBASE_DIFF_COLUMN_DEFAULT_VALUE_CONSTRAINT_NAME=<true|false>