Table of Contents

generateChangeLog Ant Task

Generates changelog to re-create an existing database.

Sample

<target name="generateChangelog" depends="prepare">
    <fail unless="database.url">database.url not set</fail>
 
    <fail unless="database.username">database.username not set</fail>
    <fail unless="database.password">database.password not set</fail>
 
    <taskdef resource="liquibasetasks.properties">
        <classpath refid="classpath"/>
    </taskdef>
 
    <generateChangeLog
            outputFile="path/to/output.xml"
            driver="${database.driver}"
            url="${database.url}"
            username="${database.username}"
            password="${database.password}"
            classpathref="classpath"
            />
</target>

Available Parameters

outputFile Where to save the generated change log file [required]
driver The name of the database driver to connect with
url The database URL [required]
username The database username to connect with [required]
password The password to use when connecting to the database [required]
defaultSchemaName Schema read objects from
classpathref A reference to the classpath that contains the database driver, liquibase.jar, and the changelog.xml file [required]
currentDateTimeFunction Overrides current date time function used in SQL. Useful for unsupported databases

Available Sub Tags

changeLogProperty Sets a changelog parameters set Since LiquiBase 1.7

Available <changeLogProperty> Parameters

name The name of the property to set
value The value of the property to set