updateCountSQL <value> command

The updateCountSQL <value> command is a helper command that inspects the SQL Liquibase will run while using the updateCount <value> command.

Uses

The updateCountSQL <value> command is used to inspect the raw SQL before running the updateCount <value> command, so you can correct any issues that may arise before running the command. Liquibase uses the raw SQL to apply a specified number of database changes you have added to the changelog file.

Running the updateCountSQL <value> command

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

Then run the updateCountSQL <value> command:

liquibase --changeLogFile=postgres_lbpro_master_changelog.xml updateCountSQL 2

Note: Enter the name of the changelog and the number that you want to use in place of postgres_lbpro_master_changelog.xmland 2.

updateCountSQL <value> global attributes

Attribute

Definition

Requirement

--changeLogFile *

Specifies the rootchangelog

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 updateCount SQL will be written

Optional

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

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

updateCountSQL <value> command attributes

Attribute Definition Requirement

<number>

The integer indicating the number of changes you want to update

Required