Skip to content

Flyway

Flyway is a database migration tool that applies versioned SQL scripts to bring a database from one state to the next. Axel Fontaine created it in 2010, and Redgate now maintains the project. Flyway favors convention over configuration — migration files follow a naming pattern (V1__description.sql, V2__description.sql) and are discovered and applied in order automatically.

The current release is Flyway 11. Migration scripts are written in plain SQL using each database's native syntax (PL/SQL, T-SQL, PL/pgSQL), or optionally in Java for more complex transformations. Flyway supports over 50 database platforms including PostgreSQL, MySQL, Oracle, and SQL Server. The tool tracks applied migrations in a schema history table and validates that previously applied migrations have not been modified. It runs as a CLI tool, a Maven or Gradle plugin, or embedded in a Java application through its API.

The official documentation covers getting started, command reference, and database-specific notes. The source code is on GitHub under the Apache 2.0 license.

www.red-gate.com/products/flyway

Related technologies

See it in action

Curious how it works? We'll walk you through it — no slides, just the real thing.