updateToTagSQL <tag> command

The updateToTagSQL <tag> command is a helper command that inspects the SQL Liquibase will run while using the updateToTag <tag> command.

Uses

The updateToTagSQL <tag> command is used to inspect the raw SQL before running the updateToTag <tag> command, so you can correct any issues that may arise before running the command. Liquibase uses the raw SQL to apply database changes you have added to the changelog file based on the tag specified.

Running the updateToTagSQL <tag> command

To run the updateToTagSQL <tag> command, you need to specify your driver, class path, URL, and user authentication information in your liquibase.properties file. You can also specify these in your command line.

Then run the updateToTagSQL command:

liquibase --changeLogFile=communityOnly.xml updateToTagSQL myTag

Note: Enter the name of the changelog and the tag that you want to use in place of communityOnly.xml and myTag.

updateToTagSQL <tag> global attributes

Attribute

Definition

Requirement

--changeLogFile *

Specifies the root changelog

Required

--url

Specifies the JDBC database connection URL

Required

--username

Specifies the database username

Required

--password

Specifies the database password

Required

--outputFile **

Specifies the file path to where the updateToTag SQL will be written

Optional

*Liquibase checks the changelog and any nested changelogs for the definitions of the changesets to update.

** If not specified, the updateToTag SQL output goes to STDOUT.

updateToTagSQL <tag> command attributes

Attribute Definition Requirement

<tag>

The tag you can add to changesets to determine which changesets in the changelog to evaluate based on their tags.

Required