Skip to content
Flyway SBT plugin
Branch: master
Clone or download
davidmweber Merge pull request #29 from SnehalRaj/PasswordUpdate
Updated Readme and Included  flywayPassword
Latest commit 538caf2 Oct 17, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
project Back to SBT 1.2.4 since that wasn't an issue Oct 12, 2018
src Fixing scripted tests Oct 12, 2018
.gitignore Sources collected from flyway repo Sep 20, 2017
.travis.yml Readme, CI and version changes. Sep 28, 2017
LICENSE Initial commit Sep 11, 2017 Merge pull request #29 from SnehalRaj/PasswordUpdate Oct 17, 2018
build.sbt 5.2.0 release Oct 17, 2018
sonatype.sbt Update docs and clean tree Feb 21, 2018

Travis Maven Central

Sbt 1.x plugin for Flyway

Welcome to the home for the sbt v1.x plugin for flyway. The user manual will tell you how to get started. This project is based on the original flyway-sbt that was in the flyway repository through version 4.2.1.

Getting started

Adding Flyway to your build is very easy. First, update to your project/plugin.sbt file to include:

 addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "5.2.0")

Edit build.sbt to enable the plugin and configure the database access:

name := "plugtest"
version := "0.0.1"
name := "flyway-sbt-test1"

libraryDependencies += "org.hsqldb" % "hsqldb" % "2.4.0"

flywayUrl := "jdbc:hsqldb:file:target/flyway_sample;shutdown=true"
flywayUser := "SA"
flywayPassword := ""
flywayLocations += "db/migration"
flywayUrl in Test := "jdbc:hsqldb:file:target/flyway_sample;shutdown=true"
flywayUser in Test := "SA"
flywayPassword in Test := ""

Migrate your database using sbt flywayMigrate or clean it using sbt flywayClean.

Note that the flywayTarget setting has been disabled due to this bug.

Building and testing

Build and testing uses sbt and it's plugin testing framework. The test cases are pretty basic (hint: we need more of those). There is no support for sbt prior to 1.0. Use the legacy plugin instead.

Note that from v5.0.0 onwards, the plugin has to be explicitly enabled using enablePlugins(FlywayPlugin). This prevents Flyway actions triggering unrelated build activity and addresses this issue.

Build and test the plugin using

sbt scripted

Early adopters should just publish a clone or fork of this repository locally:

git clone
cd flyway-sbt
sbt publishLocal
You can’t perform that action at this time.