Want to deploy your JVM, Node.js and Go apps effortlessly to AWS? Try our service Boxfuse

Ant Task: Info

Prints the details and status information about all the migrations.



<flyway:info />


Attribute Required Default Description
url YES The jdbc url to use to connect to the database
driver NO Auto-detected based on url The fully qualified classname of the jdbc driver to use to connect to the database
user NO The user to use to connect to the database
password NO The password to use to connect to the database
schemas NO default schema of the connection Case-sensitive list of schemas managed by Flyway.
The first schema will be the one containing the metadata table.
table NO schema_version The name of Flyway's metadata table.
By default (single-schema mode) the metadata table is placed in the default schema for the connection provided by the datasource.
When the flyway.schemas property is set (multi-schema mode), the metadata table is placed in the first schema of the list.
locations NO db/migration Locations to scan recursively for migrations. The location type is determined by its prefix.
Unprefixed locations or locations starting with classpath: point to a package on the classpath and may contain both sql and java-based migrations.
Locations starting with filesystem: point to a directory on the filesystem and may only contain sql migrations.
sqlMigrationPrefix NO V The file name prefix for Sql migrations
repeatableSqlMigrationPrefix NO R The file name prefix for repeatable Sql migrations
sqlMigrationSeparator NO __ The file name separator for Sql migrations
sqlMigrationSuffix NO .sql The file name suffix for Sql migrations
encoding NO UTF-8 The encoding of Sql migrations
placeholderReplacement NO true Whether placeholders should be replaced
placeholders NO Placeholders to replace in Sql migrations
placeholderPrefix NO ${ The prefix of every placeholder
placeholderSuffix NO } The suffix of every placeholder
resolvers NO Fully qualified class names of custom MigrationResolver implementations to be used in addition to the built-in ones for resolving Migrations to apply.
skipDefaultResolvers NO false Whether default built-in resolvers (sql, jdbc and spring-jdbc) should be skipped. If true, only custom resolvers are used.
callbacks NO Fully qualified class names of FlywayCallback implementations to use to hook into the Flyway lifecycle.
skipDefaultCallbacks NO false Whether default built-in callbacks (sql) should be skipped. If true, only custom callbacks are used.
target NO latest version The target version up to which Flyway should consider migrations. Migrations with a higher version number will be ignored. The special value current designates the current version of the schema.
outOfOrder NO false Allows migrations to be run "out of order".

If you already have versions 1 and 3 applied, and now a version 2 is found, it will be applied too instead of being ignored.

classpath NO The Ant classpath used to load the JDBC driver and the migrations
classpathref NO The Ant classpath reference used to load the JDBC driver and the migrations

Sample configuration

<property name="flyway.driver" value="org.hsqldb.jdbcDriver"/>
<property name="flyway.url" value="jdbc:hsqldb:file:/db/flyway_sample"/>
<property name="flyway.user" value="SA"/>
<property name="flyway.password" value="mySecretPwd"/>
<property name="flyway.schemas" value="schema1,schema2,schema3"/>
<property name="flyway.table" value="schema_history"/>
<property name="flyway.locations" value="classpath:com.mycomp.db,db/mig,filesystem:/sql-mig"/>
<property name="flyway.sqlMigrationPrefix" value="Migration-"/>
<property name="flyway.repeatableSqlMigrationPrefix" value="RRR"/>
<property name="flyway.sqlMigrationSeparator" value="__"/>
<property name="flyway.sqlMigrationSuffix" value="-OK.sql"/>
<property name="flyway.encoding" value="ISO-8859-1"/>
<property name="flyway.placeholderReplacement" value="true"/>
<property name="flyway.placeholders.aplaceholder" value="value"/>
<property name="flyway.placeholders.otherplaceholder" value="value123"/>
<property name="flyway.placeholderPrefix" value="#["/>
<property name="flyway.placeholderSuffix" value="]"/>
<property name="flyway.resolvers" value="com.mycomp.MyResolver,com.mycomp.OtherResolver"/>
<property name="flyway.skipDefaultResolvers" value="false"/>
<property name="flyway.callbacks" value="com.mycomp.MyCallback,com.mycomp.OtherCallback"/>
<property name="flyway.skipDefaultCallbacks" value="false"/>
<property name="flyway.target" value="1.1"/>
<property name="flyway.outOfOrder" value="false"/>

Sample output

[flyway:info] +-------------+------------------------+---------------------+---------+
[flyway:info] | Version     | Description            | Installed on        | State   |
[flyway:info] +-------------+------------------------+---------------------+---------+
[flyway:info] | 1           | Initial structure      | 2012-11-13 19:50:44 | Success |
[flyway:info] | 1.1         | Populate table         | 2012-11-13 19:50:44 | Success |
[flyway:info] | 1.2         | Another user           | 2012-11-13 19:50:44 | Success |
[flyway:info] | 1.3         | And his brother        | 2012-11-13 19:50:44 | Success |
[flyway:info] +-------------+------------------------+---------------------+---------+

Ant: validate