Want to deploy your JVM, Node.js and Go apps effortlessly to AWS? Try our service Boxfuse
Flyway Boxfuse
Evolve your Database Schema easily and
reliably across all your instances

Get Started with Flyway 4.2.0

Works on:

 

Upcoming Events / Trainings

Architecting for Continuous Delivery and Zero Downtime
Training | Iasi, Romania | May 10-11, 2017
Architecting for Continuous Delivery and Zero Downtime
Training | Oslo, Norway | Oct 16-17, 2017

1,600,000
downloads in 2016
Database Migrations made Easy.
Version control for your database so you can migrate it with ease and confidence

Simple

Easy to setup, simple to master. Flyway lets you regain control of your database migrations with pleasure and plain sql.

Why database migrations?

Focused

Solves only one problem and solves it well. Flyway migrates your database, so you don't have to worry about it anymore.

How does Flyway work?

Powerful

Made for continuous delivery. Let Flyway migrate your database on application startup. Releases have never been this easy.

Get started
Get up and running
in 5 minutes

For non-JVM users and environments without build tools

> flyway migrate -url=... -user=... -password=...
Get Started with the Command-line Tool

Migrate directly from within your application

Flyway flyway = new Flyway();
flyway.setDataSource(url, user, password);
flyway.migrate();
Get Started with the Java API

Seamless integration with Maven 2/3 builds

> mvn flyway:migrate -Dflyway.url=... -Dflyway.user=... -Dflyway.password=...
Get Started with the Maven Plugin

Seamless integration with Gradle builds

> gradle flywayMigrate -Dflyway.url=... -Dflyway.user=... -Dflyway.password=...
Get Started with the Gradle Plugin

Antlib with tasks for Ant 1.8 and above

<flyway:migrate url="..." user="..." password="..."/>
Get Started with the Ant Tasks

First class SBT integration

> sbt flywayMigrate -Dflyway.url=... -Dflyway.user=... -Dflyway.password=...
Get Started with the SBT plugin
It just works. Refreshingly simple.
Migrate from any version (incl. an empty database) to the latest version of the schema
Plain Old Sql

Plain SQL scripts (incl. placeholder replacement). No proprietary XML formats, no lock-in.

No limits

Java-based migrations for advanced data transformations and handling with LOBs

Zero required dependencies

All you need is Java 6+ and your Jdbc driver and you're good to go!

Convention Over Configuration

Filesystem and Classpath Scanning to automatically discover Sql and Java migrations

Highly reliable

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

Cloud support

Full support for Microsoft SQL Azure, Google Cloud SQL & App Engine, Heroku Postgres and Amazon RDS.

Auto-migration on startup

Ship migrations together with the application and run them automatically on startup using the API

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


Your relational database. Supported.
Choose from the wide range of supported databases

10g and later, all editions
(incl. Amazon RDS)

2008 and later
(incl. Amazon RDS)

latest

3.7.2 and later

5.1 and later
(incl. Amazon RDS & Google Cloud SQL)

10.0 and later
(incl. Amazon RDS)

9.7 and later

9.1 and later

9.0 and later
(incl. Heroku & Amazon RDS)

6.5 and later

latest

9.4 and later

10.8.2.2 and later

H2

1.2.137 and later

1.8 and later

4.2.2 and later

latest

6.5 and later

12.5 and later

4.3.x and later


What People are saying
Join the hundreds of thousands of delighted users.
Database migrations are something that Java developers struggle with, and Flyway provides a nice tool that anyone with basic knowledge of SQL can use. For that reason it has become the favourite migration tool in the Spring Boot team.

Dave Syer, Senior Consulting Engineer, Pivotal

Flyway should be a fundamental part of any Java EE application devops. It simplifies database migration and seamlessly integrates with your application lifecycle.

Arun Gupta, Director of Developer Advocacy, Red Hat

With techniques such as Continuous Delivery becoming more mainstream, automated database migrations are a baseline capability for many software teams. Flyway makes it as painless as possible to automate this process.

Erik Dörnenburg, Head of Technology Europe, ThoughtWorks

With Flyway you can combine the full power of SQL with solid versioning. This makes setting up and maintaining database schemas a breeze. We use it across all environments including production, making it a perfect fit for our Continuous Delivery and Zero Downtime pipeline. I highly recommend it.

Armin Gattung, Freelance Consultant


Feature Comparison
Pick the right tool for the job.
Flyway Liquibase MyBatis

Migration types

Plain Old Sql migrations 1
Java migrations 1
Xml migrations
Repeatable migrations
DDL abstraction DSL

Execution

Command-line
API (Java)
API (Android)
Maven
Gradle 2 2
Ant
SBT 2

Databases

Oracle
SQL Server
DB2
DB2 z/OS
MySQL
PostgreSQL
H2
Hsql
Derby
SQLite
solidDB
Sybase ASE
EnterpriseDB

Sql Parser

Oracle PL/SQL 3
SQL Server T-SQL 3
DB2 SQL PL 3
MySQL stored procedures 3
PostgreSQL stored procedures 3
EnterpriseDB SPL 3

Other

Auto creation of schema
Auto creation of metadata table
Cluster-safe
Checksum validation
Placeholder replacement
Multiple schema support
Clean existing schema
Output to SQL file
Available on Maven Central
License Apache v2 Apache v2 Apache v2

1. Sql files and Java classes can be used indirectly through references in xml migrations
2. Not out of the box. Available through a 3rd party. May be outdated.
3. Only a single statement at a time is supported. No mixed delimiters.

Ready to get started?
Pick any of these to learn more.

Why database migrations? How does Flyway work? First steps Download