history

The history command lists all deployed changesets and their deploymentIds. The history command does not modify the database.

Uses

The history command is typically used when you want to inspect a particular group of changes to ensure that they have been applied to the database.

Running the history command

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

Then run the history command:

liquibase history

history global attributes

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
--url

The JDBC database connection URL

Required
--username

The database username

Required
--password

The database password

Required
--output-file

Specifies that the output should go to a file rather than to STDOUT

Optional

Note: The username and password attributes are not required for connections and systems which use alternate means of authentication.

Output

When successful, the history command produces the following output:

Liquibase Version: 4.9.1
Liquibase Community 4.9.1 by Liquibase
Liquibase History for jdbc:h2:tcp://localhost:9090/mem:dev

- Database updated at 5/10/22, 2:25 PM. Applied 3 changeset(s) in 1.582s, DeploymentId: 2214257654
example-changelog.sql::1::your.name
example-changelog.sql::2::your.name
example-changelog.sql::3::other.dev

Liquibase command 'history' was executed successfully.