Skip to content

Commit

Permalink
Refer to external flyway-sbt repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Fontaine committed Nov 30, 2017
1 parent b1bb4f1 commit a0df498
Show file tree
Hide file tree
Showing 18 changed files with 167 additions and 1,600 deletions.
6 changes: 3 additions & 3 deletions _layouts/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@
{% if page.menu == 'dropwizard' %} class="active" {% endif %}>
<a href="/documentation/plugins/dropwizard">Dropwizard</a></li>
<li
{% if page.menu == 'Play' %} class="active" {% endif %}>
{% if page.menu == 'play' %} class="active" {% endif %}>
<a href="/documentation/plugins/play">Play</a></li>
<li
{% if layout.menu == 'sbt' %} class="active" {% endif %}>
<a href="/documentation/sbt">SBT</a></li>
{% if page.menu == 'sbt' %} class="active" {% endif %}>
<a href="/documentation/plugins/sbt">SBT</a></li>
<li
{% if page.menu == 'plugins' %} class="active" {% endif %}>
<a href="/documentation/plugins/other">Other Tools/Frameworks</a></li>
Expand Down
26 changes: 26 additions & 0 deletions assets/logos/sbt.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 0 additions & 46 deletions documentation/plugins/dropwizard.html

This file was deleted.

44 changes: 44 additions & 0 deletions documentation/plugins/dropwizard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: documentation
menu: dropwizard
subtitle: 'Dropwizard'
---
# Dropwizard

<img src="/assets/logos/dropwizard.png">

## Application startup

While Dropwizard doesn't come with out-of-the-box integration for Flyway you can easily run Flyway on application startup by adding `flyway-core` to your `pom.xml`:
<pre class="prettyprint">&lt;dependency&gt;
&lt;groupId&gt;org.flywaydb&lt;/groupId&gt;
&lt;artifactId&gt;flyway-core&lt;/artifactId&gt;
&lt;version&gt;{{ site.flywayVersion }}&lt;/version&gt;
&lt;/dependency&gt;</pre>

And calling Flyway from your application class:

<pre class="prettyprint" style="font-size: 90%">public class MyApplication extends Application&lt;MyConfiguration&gt; {
...

@Override
public void run(MyConfiguration configuration, Environment environment) {
DataSourceFactory dataSourceFactory = configuration.getDataSourceFactory();
Flyway flyway = new Flyway();
flyway.setDataSource(dataSourceFactory.getUrl(), dataSourceFactory.getUser(), dataSourceFactory.getPassword());
flyway.migrate();
...
}
}</pre>

## CLI add-on

Jochen Schalanda has created a great <strong><a href="https://github.com/joschi/dropwizard-flyway">Dropwizard Add-On</a></strong> that adds Flyway commands to the CLI of your Dropwizard application.

The website also comes with comprehensive documentation on usage and configuration.

<a class="inline-cta" href="https://boxfuse.com/blog/dropwizard-aws"><i class="fa fa-cloud"></i> Want to deploy your Dropwizard apps effortlessly to AWS? Follow our <strong>5 minute</strong> tutorial using <img src="/assets/logo/boxfuse-logo-nano-blue.png"> Boxfuse <i class="fa fa-arrow-right"></i></a>

<p class="next-steps">
<a class="btn btn-primary" href="/documentation/plugins/play">Play <i class="fa fa-arrow-right"></i></a>
</p>
31 changes: 0 additions & 31 deletions documentation/plugins/grails.html

This file was deleted.

23 changes: 23 additions & 0 deletions documentation/plugins/grails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: documentation
menu: grails
subtitle: 'Grails'
---
# Grails

<img src="/assets/logos/grails.png">

Grails 3.x is based on Spring Boot comes with out-of-the-box <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-execute-flyway-database-migrations-on-startup">integration for Flyway</a>.

All you need to do is add `flyway-core` to your `build.gradle`:
<pre class="prettyprint">compile "org.flywaydb:flyway-core:{{ site.flywayVersion }}"</pre>

Spring Boot will then automatically autowire Flyway with its DataSource and invoke it on startup.

You can then configure a good number of Flyway properties <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html">directly from your <code>application.properties</code> or <code>application.yml file</code></a>.

<a class="inline-cta" href="https://boxfuse.com/blog/grails-aws"><i class="fa fa-cloud"></i> Want to deploy your Grails 3 apps effortlessly to AWS? Follow our <strong>5 minute</strong> tutorial using <img src="/assets/logo/boxfuse-logo-nano-blue.png"> Boxfuse <i class="fa fa-arrow-right"></i></a>

<p class="next-steps">
<a class="btn btn-primary" href="/documentation/plugins/dropwizard">Dropwizard <i class="fa fa-arrow-right"></i></a>
</p>
26 changes: 0 additions & 26 deletions documentation/plugins/play.html

This file was deleted.

24 changes: 24 additions & 0 deletions documentation/plugins/play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
layout: documentation
menu: play
subtitle: 'Play'
---
# Play

<img src="/assets/logos/play.png" style="margin-bottom: 20px">

Play doesn't come with out-of-the-box support for Flyway, however Toshiyuki Takahashi has created a Play plugin to substitute Evolutions for Flyway.

This lets you run your Flyway migrations on Play application startup.

For <strong>Play 2.1, 2.2 and 2.3</strong> you can use the <a href="https://github.com/tototoshi/play-flyway">play-flyway plugin</a>.

For <strong>Play 2.4 and newer</strong> you can use the <a href="https://github.com/flyway/flyway-play">flyway-play module</a>.

Both sites contain instructions on how to get started quickly as well as comprehensive documentation on usage and configuration.

<a class="inline-cta" href="https://boxfuse.com/blog/playframework-aws"><i class="fa fa-cloud"></i> Want to deploy your Play apps effortlessly to AWS? Follow our <strong>5 minute</strong> tutorial using <img src="/assets/logo/boxfuse-logo-nano-blue.png"> Boxfuse <i class="fa fa-arrow-right"></i></a>

<p class="next-steps">
<a class="btn btn-primary" href="/documentation/plugins/sbt">SBT <i class="fa fa-arrow-right"></i></a>
</p>
16 changes: 16 additions & 0 deletions documentation/plugins/sbt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: documentation
menu: sbt
subtitle: 'SBT'
---
# SBT

<img src="/assets/logos/sbt.svg" height="80">

David Webber maintains a great <strong><a href="https://github.com/flyway/flyway-sbt">SBT 1.0+ plugin</a></strong> that adds Flyway commands to your build.

The website also comes with comprehensive documentation on usage and configuration.

<p class="next-steps">
<a class="btn btn-primary" href="/documentation/plugins/other">Other Tools &amp; Frameworks <i class="fa fa-arrow-right"></i></a>
</p>
31 changes: 0 additions & 31 deletions documentation/plugins/springboot.html

This file was deleted.

31 changes: 31 additions & 0 deletions documentation/plugins/springboot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: documentation
menu: springboot
subtitle: 'Spring Boot'
---
# Spring Boot

<img src="/assets/logos/springboot.png" style="margin-bottom: 20px">

Spring Boot comes with out-of-the-box <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-execute-flyway-database-migrations-on-startup">integration for Flyway</a>.

All you need to do is add `flyway-core` to either your `pom.xml`:
<pre class="prettyprint">&lt;dependency&gt;
&lt;groupId&gt;org.flywaydb&lt;/groupId&gt;
&lt;artifactId&gt;flyway-core&lt;/artifactId&gt;
&lt;version&gt;{{ site.flywayVersion }}&lt;/version&gt;
&lt;/dependency&gt;</pre>

Or `build.gradle`:

<pre class="prettyprint">compile "org.flywaydb:flyway-core:{{ site.flywayVersion }}"</pre>

Spring Boot will then automatically autowire Flyway with its DataSource and invoke it on startup.

You can then configure a good number of Flyway properties <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html">directly from your <code>application.properties</code> or <code>application.yml file</code></a>.

<a class="inline-cta" href="https://boxfuse.com/blog/spring-boot-ec2"><i class="fa fa-cloud"></i> Want to deploy your Spring Boot apps effortlessly to AWS? Follow our <strong>5 minute</strong> tutorial using <img src="/assets/logo/boxfuse-logo-nano-blue.png"> Boxfuse <i class="fa fa-arrow-right"></i></a>

<p class="next-steps">
<a class="btn btn-primary" href="/documentation/plugins/grails">Grails <i class="fa fa-arrow-right"></i></a>
</p>

0 comments on commit a0df498

Please sign in to comment.