File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/main/java/io/zonky/test/db/postgres/embedded Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 134134 <dependency >
135135 <groupId >org.flywaydb</groupId >
136136 <artifactId >flyway-core</artifactId >
137- <version >5 .0.7 </version >
137+ <version >6 .0.8 </version >
138138 <optional >true</optional >
139139 </dependency >
140140 <dependency >
Original file line number Diff line number Diff line change 2121import javax .sql .DataSource ;
2222
2323import org .flywaydb .core .Flyway ;
24+ import org .flywaydb .core .api .configuration .FluentConfiguration ;
2425
2526// TODO: Detect missing migration files.
2627// cf. https://github.com/flyway/flyway/issues/1496
2728// There is also a related @Ignored test in otj-sql.
2829
2930public final class FlywayPreparer implements DatabasePreparer {
3031
31- private final Flyway flyway ;
32+ private final FluentConfiguration flyway ;
3233 private final List <String > locations ;
3334
3435 public static FlywayPreparer forClasspathLocation (String ... locations ) {
35- Flyway f = new Flyway ();
36- f . setLocations (locations );
36+ FluentConfiguration f = Flyway . configure ()
37+ . locations (locations );
3738 return new FlywayPreparer (f , Arrays .asList (locations ));
3839 }
3940
40- private FlywayPreparer (Flyway flyway , List <String > locations ) {
41+ private FlywayPreparer (FluentConfiguration flyway , List <String > locations ) {
4142 this .flyway = flyway ;
4243 this .locations = locations ;
4344 }
4445
4546 @ Override
4647 public void prepare (DataSource ds ) throws SQLException {
47- flyway .setDataSource (ds );
48- flyway .migrate ();
48+ flyway .dataSource (ds );
49+ flyway .load (). migrate ();
4950 }
5051
5152 @ Override
You can’t perform that action at this time.
0 commit comments