My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

Important: Flyway.setTransactionManager() and Flyway.getTransactionManager() will be removed in the next release. More info

New: Wiki page listing articles about Flyway. More info



The agile database migration framework for Java



Latest Version

Flyway 1.5 (Released 2011-11-09) - Download - Release Notes



Highlights

It just works - Refreshingly simple. Migrate from any version (incl. an empty database) to the latest version of the schema.

Automatic migration on startup - Ship migrations together with the application and run them automatically on startup using the API.

Convention Over Configuration - Classpath Scanning to automatically discover Sql and Java migrations

Plain Old Sql - SQL scripts for regular migrations (incl. placeholder replacement). No proprietary XML formats, no lock-in.

No limits - Java classes for advanced migrations

Highly reliable - Safe for cluster environments (Multiple machines can migrate in parallel)

Build tool support - Maven plugin and Ant tasks for migrating manually

Not only for Java - Command-line tool for non-JVM users and environments without Maven

Fail fast - Inconsistent database or failed migration prevents app from starting.

Schema Clean - Drop all tables, views, triggers, ... from a schema without dropping the schema itself



Features

Flyway Liquibase c5-db-migration dbdeploy mybatis MIGRATEdb migrate4j dbmaintain AutoPatch


Migration types
Plain Old Sql migrations (1)
Java migrations (1)
Groovy migrations
Xml migrations


Execution
Migrate from within application (API)
Maven plugin
Ant tasks
Command-line tool


Databases
Oracle
SQL Server
DB2
MySQL
PostgreSQL
H2
Hsql


Sql Parser
Oracle PL/SQL (2)
SQL Server T-SQL (2)
DB2 SQL PL (2)
MySQL stored procedures (2) (3)
PostgreSQL stored procedures (2)


Other
Automatic creation of metadata table
Cluster-safe
Checksum validation
Placeholder replacement
Multiple schema support
Clean existing schema
Available on Maven Central
License Apache v2 Apache v2 Apache v2 BSD Apache v2 BSD LGPL v3 Apache v2 Apache

1. Sql files and Java classes can be used indirectly through references in xml migrations

2. Only a single statement at a time is supported. No mixed delimiters.

3. Only Oracle-style PL/SQL delimeters. No MySQL standard syntax using the DELIMITER statement.



Installation

Both Flyway, the Flyway Maven Plugin and the Flyway Ant Tasks are available from Maven Central.

Alternatively you can also use the download page.

Just add this to your POM and you're good to go:

Flyway

<dependency>
    <groupId>com.googlecode.flyway</groupId>
    <artifactId>flyway-core</artifactId>
    <version>1.5</version>
</dependency>

Flyway Maven Plugin

<plugin>
    <groupId>com.googlecode.flyway</groupId>
    <artifactId>flyway-maven-plugin</artifactId>
    <version>1.5</version>
    <configuration>
        ....
    </configuration>
</plugin>

Maven plugin configuration and goal info available here

Flyway Ant Tasks

For Ant and Ivy simply add the following line to your ivy.xml

<dependency org="com.googlecode.flyway" name="flyway-ant" rev="1.5"/>



Requirements

  • Java 5+
  • Spring Jdbc 2.5+
  • Jdbc driver for your database



Supported Databases

  • Oracle 10g and later, XE
  • SQL Server 2008 and later
  • DB2 9.7 and later
  • MySQL 5.1 and later
  • PostgreSQL 9.0 and later
  • HsqlDb 1.8 and later
  • H2 1.2.137 and later

More info available here

More Info

Powered by Google Project Hosting