markNextChangeSetRanSQL command

The markNextChangeSetRanSQL command is a helper command that inspects the SQL Liquibase will run while using the markNextChangeSetRan command.

Uses

The markNextChangeSetRanSQL command is used to inspect the raw SQL before running the markNextChangeSetRan command, so you can correct any issues that may arise before running the command. Liquibase uses the raw SQL to mark the next changeset you apply as executed in your database and to keep that changeset in the changelog as a record assuming that it has already been deployed.

Running the markNextChangeSetRanSQL command

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

Then run the markNextChangeSetRanSQL command:

liquibase --changeLogFile=dbchangelog.oracle.sql markNextChangeSetRanSQL

Note: Enter the name of the changelog that you want to use in place of markNextChangeSetRanSQL and include your database type in place of oracle if you use the .sql file format.

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

Optional

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