• Reference
  • Version ยท 6.0
  • Change Automation Reference

changelog-pretty-print-sql

Last updated: September 29, 2026

--changelog-pretty-print-sql is a global Boolean parameter that controls whether Liquibase reformats the SQL it writes to a SQL-format changelog across several lines instead of one long line. The default value is false.

Uses

When Liquibase writes a changelog in SQL format, it writes each statement on a single line by default. Set --changelog-pretty-print-sql to true to reformat each statement Liquibase recognizes across several lines instead, so the file stays readable and produces a useful git diff.

The parameter covers every command that writes a SQL-format changelog, so it applies to generate-changelog and diff-changelog alike.

Note: Pretty-printing adds line breaks and indentation and nothing else. Liquibase does not rewrite or reinterpret your SQL, and column types are written exactly as the database reported them. Your checksums are unaffected, because Liquibase strips whitespace out of a statement before it computes the changeset checksum.

Tables, indexes, constraints, views, sequences, and Microsoft SQL Server extended properties are reformatted. Stored logic is never touched, and any statement Liquibase does not recognize passes through byte for byte.

Example: changelog-pretty-print-sql

liquibase --changelog-pretty-print-sql=true generate-changelog --changelog-file=example-changelog.sql

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.changelog.prettyPrintSql: <true|false>

Global flow file argument

globalArgs: { changelog-pretty-print-sql: "<true|false>" }

Global CLI parameter

liquibase --changelog-pretty-print-sql=<true|false> generate-changelog --changelog-file=example-changelog.sql

JVM system property (JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.changelog.prettyPrintSql=<true|false>

Windows:

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

Liquibase environment variable

LIQUIBASE_CHANGELOG_PRETTY_PRINT_SQL=<true|false>