changelogSyncSQL command

The changelogSyncSQL is a helper command that produces the raw SQL Liquibase would run when using the changelogSync command.


The changelogSyncSQL command is typically used when you want to inspect the SQL Liquibase will use to baseline a new database environment.

It is best practice to inspect any SQL that Liquibase would run when using the changelogSync command so you can review any changes the command would make to your database before running the command.

Running the changelogSyncSQL command

To run the changelogSyncSQL command, type the following into your command line:

Liquibase --changelogFile=mychangelog.sql changelogSyncSQL

Note: Replace mychangelog.sql with the name of your changelog and ensure you have specified your JDBC database connection information in your file.

changelogSyncSQL Global Attributes

Attributes Definition Requirement
--changeLogFile The root changelog Required
--url The JDBC database connection URL Required
--username The database username Required
--password The database password Required
--outputFile* Specifies the file path to where the changelogSync SQL will be written Optional

*If not specified, the changelogSyncSQL output goes to STDOUT.