Coder Social home page Coder Social logo

flyway-sbt's Introduction

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.0.0-RC2")

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

enablePlugins(FlywayPlugin)
name := "plugtest"
version := "0.0.1"
name := "flyway-sbt-test1"

libraryDependencies ++= Seq(
  "org.hsqldb" % "hsqldb" % "2.2.8",
  "org.flywaydb" % "flyway-core" % "5.0.7"
)

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

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 https://github.com/flyway/flyway-sbt.git
cd flyway-sbt
sbt publishLocal

flyway-sbt's People

Contributors

davidmweber avatar reid-spencer avatar xuwei-k avatar

Watchers

Arieh Leviav avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.