flyway / flyway-test-extensions

Apache License 2.0
129 stars 35 forks source link

Update to work with flyway 9 #97

Closed Cos4Nostr4 closed 1 year ago

Cos4Nostr4 commented 1 year ago

Spring Boot 3.0.x was released and its auto-configuration supports flyway version 8+. There is a small range of versions Spring Boot and this library can both work with (around flyway version 8.5.12). However, flyway versions 9.x.x do not work with this library

FlorianGWE commented 1 year ago

I hope I came over the easter week, to build a new version.

FlorianGWE commented 1 year ago

A patch will be wellcome ;)

FlorianGWE commented 1 year ago

I take a short look into Spring Boot 3.0, so it is a Spring Boot issue and not a complete issue for flyway test. So i will solve here only the compatibility to Flyway 9.

Solving the Spring Boot integration is to tweak autoconfiguration from Spring Boot relay on a Flyway method that was deprecated in Flyway 8 and removed in Flyway 9.

FlorianGWE commented 1 year ago

See Branch https://github.com/flyway/flyway-test-extensions/tree/feature/flyway_9 I changed the project so no longer the context configuration will be provided.

In my opinion it should also work if you do the same as I did in the spring boot example project https://github.com/flyway/flyway-test-extensions/tree/feature/flyway_9/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0.

Important to set following property inside test spring.flyway.clean-disabled=false

I do not tried it out without my other changes.

FlorianGWE commented 1 year ago

I take a short look into Spring Boot 3.0, so it is a Spring Boot issue and not a complete issue for flyway test. So i will solve here only the compatibility to Flyway 9.

Solving the Spring Boot integration is to tweak autoconfiguration from Spring Boot relay on a Flyway method that was deprecated in Flyway 8 and removed in Flyway 9.

I was wrong new Spring Boot work per default with Flyway 9.

FlorianGWE commented 1 year ago

Building a new release will take a will, because I have to switch the location and the computer.