status

The status command states the number of undeployed changesets. Running status lists all undeployed changesets. It also lists the id, author, and file path name for each undeployed changeset. The status command does not modify the database.

Uses

The status command is typically used when changesets were added to a changelog through source control by another developer. The command confirms what has been deployed and what changesets are pending per author and corresponding IDs.

Syntax

To run the status command, specify the driver, classpath, and URL in the properties file. For more information, see Create and Configure a liquibase.properties File. You can also specify these properties in your command line.

Run the status command:

liquibase status --changelog-file=example-changelog.xml

Command arguments

Tip: For best results, specify all commands and parameters in the --kebab-case format in the CLI. If your preference is camelCase, it also works in the CLI.

Attribute Definition Requirement
--changelog-file

The root changelog

Required
--url

The JDBC database connection URL. See Using JDBC URL in Liquibase.

Required
--username

Username to connect to the target database

Required
--password

Password to connect to the target database

Required
--contexts

Specifies the changeset contexts to match. Contexts are expressions you can add to changesets to control which changesets are executed in any particular migration run.

Optional
--default-catalog-name

Name of the default catalog to use for the database connection

Optional
--default-schema-name

Name of the default schema to use for the database connection

Optional
--driver

The JDBC driver class

Optional
--driver-properties-file

The JDBC driver properties file

Optional
--label-filter

Specifies the changeset labels to match. Labels are tags you can add to changesets to control which changeset will be executed in any migration run.

Optional
--verbose

Specifies the detail level of the command's output.

Optional

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication. Also, you can specify database credentials as part of the url attribute.

Related links