Skip to content

Commit 7bec702

Browse files
committed
flyway changes
+ flyway: 4.2.0 fix #914 + flyway module shouldnt create a new datasource fix #913
1 parent 8db8d51 commit 7bec702

File tree

6 files changed

+244
-246
lines changed

6 files changed

+244
-246
lines changed

doc/doc/flyway/flyway.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Evolve your Database Schema easily and reliably across all your instances.
44

55
This module run {{flyway}} on startup and apply database migration.
66

7+
> NOTE: This module depends on [jdbc](https://github.com/jooby-project/jooby/tree/master/jooby-jdbc) module so all the services provided by the [jdbc](https://github.com/jooby-project/jooby/tree/master/jooby-jdbc) module.
8+
79
## dependency
810

911
```xml
@@ -16,12 +18,6 @@ This module run {{flyway}} on startup and apply database migration.
1618

1719
## usage
1820

19-
```properties
20-
flyway.url = ...
21-
flyway.user = ...
22-
flyway.password = ...
23-
```
24-
2521
```java
2622
{
2723
use(new Jdbc());
@@ -32,18 +28,13 @@ flyway.password = ...
3228

3329
If for any reason you need to maintain two or more databases:
3430

35-
```properties
36-
flyway.db1.url = "..."
37-
flyway.db1.locations = db1/migration
38-
39-
flyway.db2.url = "..."
40-
flyway.db2.locations = db2/migration
41-
```
42-
4331
```java
4432
{
45-
use(new Flywaydb("flyway.db1"));
46-
use(new Flywaydb("flyway.db2"));
33+
use(new Jdbc("db1"));
34+
use(new Flywaydb("db1"));
35+
36+
use(new Jdbc("db2"));
37+
use(new Flywaydb("db2"));
4738
}
4839
```
4940

doc/doc/jdbi3/jdbi3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<a href="https://jdbi.github.io">Jdbi</a> provides a convenience interface for SQL operations in Java.
44

5-
This module depends on [jdbc](https://github.com/jooby-project/jooby/tree/master/jooby-jdbc) module so all the services provided by the [jdbc](https://github.com/jooby-project/jooby/tree/master/jooby-jdbc) module.
5+
> NOTE: This module depends on [jdbc](https://github.com/jooby-project/jooby/tree/master/jooby-jdbc) module so all the services provided by the [jdbc](https://github.com/jooby-project/jooby/tree/master/jooby-jdbc) module.
66
77
## dependency
88

modules/coverage-report/src/test/java/org/jooby/flyway/FlywayFeature.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.Arrays;
44

55
import org.flywaydb.core.Flyway;
6+
import org.jooby.jdbc.Jdbc;
67
import org.jooby.test.ServerFeature;
78
import org.junit.Test;
89

@@ -13,12 +14,12 @@ public class FlywayFeature extends ServerFeature {
1314

1415
{
1516
use(ConfigFactory.empty()
16-
.withValue("flyway.url",
17-
ConfigValueFactory.fromAnyRef("jdbc:h2:mem:1436458102203;DB_CLOSE_DELAY=-1"))
1817
.withValue("flyway.locations", ConfigValueFactory
1918
.fromAnyRef(Arrays.asList("org/jooby/flyway"))));
2019

21-
use(new Flywaydb());
20+
use(new Jdbc("jdbc:h2:mem:foo;DB_CLOSE_DELAY=-1"));
21+
22+
use(new Flywaydb("foo"));
2223

2324
get("/flyway/info", req -> req.require(Flyway.class).info().current().getDescription());
2425
}

modules/jooby-flyway/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
<!-- Jooby -->
3636
<dependency>
3737
<groupId>org.jooby</groupId>
38-
<artifactId>jooby</artifactId>
39-
<version>${project.version}</version>
38+
<artifactId>jooby-jdbc</artifactId>
4039
</dependency>
4140

4241
<!-- Flyway -->

0 commit comments

Comments
 (0)