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.xml
and 2
.
updateCountSQL <value>
global attributes
Attribute |
Definition |
Requirement |
|
Specifies the rootchangelog |
Required |
|
Specifies the JDBC database connection URL |
Required |
|
Specifies the database username |
Required |
|
Specifies the database password |
Required |
|
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 |
---|---|---|
|
The integer indicating the number of changes you want to update |
Required |

Liquibase Pro 3.10.0 by Datical licensed to Liquibase Pro Customer until Tue Nov 03 19:00:00 CST 2020
-- *********************************************************************
-- Update 2 Change Sets Database Script
-- *********************************************************************
-- Change Log: postgres_lbpro_master_changelog.xml
-- Ran at: 6/30/20 4:43 PM
-- Against: daticaluser1@jdbc:postgresql://localhost:5433/goku
-- Liquibase version: 3.10.0
-- *********************************************************************
-- Lock Database
UPDATE public.databasechangeloglock SET LOCKED = TRUE, LOCKEDBY = 'gemfire-PC (192.168.1.11)', LOCKGRANTED = '2020-06-30 16:43:59.648' WHERE ID = 1 AND LOCKED = FALSE;
-- Changeset postgres_lbpro_master_changelog.xml::1::createTableforSynonym-proschema::Liquibase Pro User
CREATE TABLE "proschema"."primary_table" ("name" CHAR(20));
INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('1::createTableforSynonym-proschema', 'Liquibase Pro User', 'postgres_lbpro_master_changelog.xml', NOW(), 7, '8:2e63963bef0a14594b566e06c3eabe2d', 'createTable tableName=primary_table', '', 'EXECUTED', NULL, 'setup,duplicateid,duplicateauthor,duplicateauthorandid', '3.10.0', '3553441894');
-- Changeset postgres_lbpro_master_changelog.xml::2::createTableforView-proschema::Liquibase Pro User
CREATE TABLE "proschema"."account" ("acct_num" numeric(20, 0), "amount" numeric(10, 2));
INSERT INTO public.databasechangelog (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('2::createTableforView-proschema', 'Liquibase Pro User', 'postgres_lbpro_master_changelog.xml', NOW(), 8, '8:5d7dc933cc4831666c560deef4dd64ed', 'createTable tableName=account', '', 'EXECUTED', NULL, 'setup', '3.10.0', '3553441894');
-- Release Database Lock
UPDATE public.databasechangeloglock SET LOCKED = FALSE, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1;