The LiquibaseDiffTask
creates a diff between two databases. Will
output the changes needed to convert the reference database to the state
of the database.
Table C.56: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
jar | String | Location of the Liquibase jar file. | n/a | Yes |
classpath | String | Additional classpath entries. | n/a | Yes |
changeLogFile | String | Location of the changelog file in which the changes get written or read from. | n/a | Yes |
username | String | The username needed to connect to the database. | n/a | Yes |
password | String | The password needed to connect to the database. | n/a | Yes |
url | String | The JDBC Url representing the database datasource, e.g jdbc:mysql://localhost/mydatabase | n/a | Yes |
referenceUsername | String | The username needed to connect to the reference database. | n/a | Yes |
referencePassword | String | The password needed to connect to the reference database. | n/a | Yes |
referenceUrl | String | The JDBC Url representing the database reference datasource, e.g jdbc:mysql://localhost/refdatabase | n/a | Yes |
display | Boolean | Whether to display the output of the command. Only used if passthru isn't true. | false | No |
passthru | Boolean | Whether to use PHP's passthru() function instead of exec() . True by default for backwards compatibility. When true, the attributes display , outputProperty and checkReturn are ignored. | true | No |
checkreturn | Boolean | Whether to check the return code of the execution, throws a BuildException when returncode != 0. | false | No |
outputProperty | String | Property name to set output value to from the execution. Ignored if passthru attribute is true. | n/a | No |
<liquibase-diff 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" referenceUsername="liquibase" referencePassword="liquibase" referenceUrl="jdbc:mysql://localhost/refdatabase" />
parameter
Same as for Section C.50, “LiquibaseTask”.
property
Same as for Section C.50, “LiquibaseTask”.