should-snapshot-data

The should-snapshot-data parameter is a Boolean that allows Liquibase to snapshot your database data. The default value is false.

Uses

You can use the should-snapshot-data parameter with the generate-changelog command. If you specify shouldSnapshotData=true, the generate-changelog command will include insert statements for the data in your database or <loadData> if the dataDir argument is set.

Note: The diff-changelog command does not compare data and therefore does not generate the data-related changesets, even if you have shouldSnapshotData=true.

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.shouldSnapshotData: <true|false>

Global flow file argument

globalArgs: { pro-strict: "<true|false>" }

Global CLI parameter

liquibase --should-snapshot-data=<true|false> generate-changelog --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS environment variable)

Unix:

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

Windows:

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

Liquibase environment variable

LIQUIBASE_COMMAND_CHANGELOG_FILE=<string>

For more information, see Working with command parameters.