GithubHelp home page GithubHelp logo

flyway-sbt's Introduction

Scala CI 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.

Maintenance

This repository is a community project and not officially maintained by the Flyway Team at Redgate. This project is looked after only by the open source community. Community Maintainers are people who have agreed to be contacted with queries for support and maintenance. Community Maintainers:

If you would like to be named as an Community Maintainer, let us know via Twitter: https://twitter.com/flywaydb.

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" % "7.4.0")

Please check out Maven Central for versions of flyway-sbt for previous versions of Flyway.

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

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

libraryDependencies += "org.hsqldb" % "hsqldb" % "2.5.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 https://github.com/flyway/flyway-sbt.git
cd flyway-sbt
sbt publishLocal

flyway-sbt's People

Contributors

bitnot avatar davidmweber avatar dnskimo avatar etspaceman avatar ldrygala avatar nerdydrew avatar reid-spencer avatar sergiuszkierat avatar smur89 avatar snehalraj avatar sullis avatar takayahilton avatar vincibean avatar xuwei-k 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.