C.35 LiquibaseRollbackTask

The LiquibaseRollbackTask rolls back the database to the state is was when the tag was applied.

Table C.37: Attributes

NameTypeDescriptionDefaultRequired
jarStringLocation of the Liquibase jar file.n/aYes
classpathStringAdditional classpath entries.n/aYes
changeLogFileStringLocation of the changelog file in which the changes get written or read from.n/aYes
usernameStringThe username needed to connect to the database.n/aYes
passwordStringThe password needed to connect to the database.n/aYes
urlStringThe JDBC Url representing the database datasource, e.g jdbc:mysql://localhost/mydatabasen/aYes
rollbackTagStringThe name of the tag to roll the database back to.n/aYes

C.35.1 Example

<liquibase-rollback
  jar="/usr/local/lib/liquibase/liquibase.jar"
  classpathref="/usr/local/lib/liquibase/lib/mysql-connector-java-5.1.15-bin.jar"
  changelogFile="./changelogTest.xml"
  username="liquibase"
  password="liquibase"
  url="jdbc:mysql://localhost/mydatabase"
  rollbackTag="tag_0_1"
/>