tag-exists

The tag-exists command checks whether the tag you specify already exists in your database.

Uses

The tag-exists command is typically used to identify whether the specified tag exists in the database or specifically in the DATABASECHANGELOG table. Running the tag-exists command checks for the tag and, based on whether it exists or not, provides the appropriate output.

Running the tag-exists command

To run the tag-exists command, specify the driver, classpath, and URL in the Liquibase properties file. For more information, see Specifying Properties in a Connection Profile. You can also specify these properties in your command line.

Then run the tag-exists command:

liquibase --changelog-file=communityOnly.xml tag-exists --tag myTag

Note: Enter the name of the changelog and the tag that you want to use in place of communityOnly.xml and myTag.

tag-exists global attributes

Tip: All commands and parameters use the --kebab-case format in the CLI environment. This is the format Liquibase recommends for best results. If your preference is camelCase, it will still work in the CLI.

Attribute Definition Requirement
--changelog-file The root changelog Required
--url The JDBC database connection URL Required
--username The database username Required
--password The database password Required

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

tag-exists command attributes

Attribute Definition Requirement
<tag> Tags allow the user to identify which changesets in the changelog to evaluate. Required