Bootique integration with Flyway
Java
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bootique-flyway
.gitignore
.travis.yml
LICENSE
README.md
RELEASE-NOTES.md
pom.xml
travis_settings.xml

README.md

Build Status Maven Central

bootique-flyway

Provides Flyway migrations framework integration with Bootique. See usage example bootique-flyway-demo.

Setup

Add bootique-flyway to your build tool:

Maven

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.bootique.bom</groupId>
            <artifactId>bootique-bom</artifactId>
            <version>0.25</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependency>
    <groupId>io.bootique.flyway</groupId>
    <artifactId>bootique-flyway</artifactId>
</dependency>

Gradle

compile("io.bootique.flyway:bootique-flyway:0.25")

Note: bootique-flyway is a part of bootique-bom, and version can be imported from there.

Available commands

Flyway is based around just 6 commands: Migrate, Clean, Info, Validate, Baseline and Repair. They are presented in Bootique-Flyway module:

OPTIONS
  -b, --baseline
       Baselines an existing database, excluding all migrations up to and including baselineVersion.

  --clean
       Drops all objects (tables, views, procedures, triggers, ...) in the configured schemas.The schemas are cleaned in the order specified by the schemas property.

  -i, --info
       Prints the details and status information about all the migrations.

  -m, --migrate
       Migrates the schema to the latest version. Flyway will create the metadata table automatically if it doesn't exist.

  -r, --repair
       Repairs the metadata table.

  -v, --validate
       Validate applied migrations against resolved ones (on the filesystem or classpath) to detect accidental changes that may prevent the schema(s) from being recreated exactly.

Example Project

bootique-flyway-demo