From 026f128d5adbe027055a9d50a5a26937da14ef21 Mon Sep 17 00:00:00 2001 From: FlorianGWE Date: Sun, 1 Oct 2023 18:57:10 +0200 Subject: [PATCH 1/3] update developer version to 9.22 --- flyway-test-extensions/flyway-dbunit-spring4-test/pom.xml | 2 +- flyway-test-extensions/flyway-dbunit-test/pom.xml | 2 +- flyway-test-extensions/flyway-spring-test/pom.xml | 2 +- flyway-test-extensions/flyway-spring4-test/pom.xml | 2 +- flyway-test-extensions/flyway-spring5-test/pom.xml | 2 +- flyway-test-extensions/flyway-spring6-test/pom.xml | 2 +- .../flyway-test-sample-dbunit-spring4/pom.xml | 2 +- .../flyway-test-sample-dbunit/pom.xml | 2 +- .../flyway-test-samples/flyway-test-dbunit-samples/pom.xml | 4 ++-- .../flyway-test-samples/flyway-test-samples-parent/pom.xml | 2 +- .../flyway-test-spring-samples/flyway-test-junit5/pom.xml | 2 +- .../sample-spring-boot-2-7/pom.xml | 4 ++-- .../sample-spring-boot-2-ext/pom.xml | 4 ++-- .../sample-spring-boot-3-0/pom.xml | 2 +- .../flyway-test-sample-spring4/pom.xml | 2 +- .../flyway-test-sample-spring5/pom.xml | 2 +- .../flyway-test-spring-samples/flyway-test-testng/pom.xml | 2 +- .../flyway-test-samples/flyway-test-spring-samples/pom.xml | 4 ++-- flyway-test-extensions/flyway-test-samples/pom.xml | 4 ++-- flyway-test-extensions/flyway-test/pom.xml | 2 +- flyway-test-extensions/parent/pom.xml | 2 +- flyway-test-extensions/pom.xml | 2 +- 22 files changed, 27 insertions(+), 27 deletions(-) diff --git a/flyway-test-extensions/flyway-dbunit-spring4-test/pom.xml b/flyway-test-extensions/flyway-dbunit-spring4-test/pom.xml index ec27fd9..cc1e424 100644 --- a/flyway-test-extensions/flyway-dbunit-spring4-test/pom.xml +++ b/flyway-test-extensions/flyway-dbunit-spring4-test/pom.xml @@ -20,7 +20,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../parent/pom.xml diff --git a/flyway-test-extensions/flyway-dbunit-test/pom.xml b/flyway-test-extensions/flyway-dbunit-test/pom.xml index 8ede192..b20d5ff 100644 --- a/flyway-test-extensions/flyway-dbunit-test/pom.xml +++ b/flyway-test-extensions/flyway-dbunit-test/pom.xml @@ -20,7 +20,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../parent/pom.xml diff --git a/flyway-test-extensions/flyway-spring-test/pom.xml b/flyway-test-extensions/flyway-spring-test/pom.xml index a3326ce..0c066f1 100644 --- a/flyway-test-extensions/flyway-spring-test/pom.xml +++ b/flyway-test-extensions/flyway-spring-test/pom.xml @@ -22,7 +22,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../parent/pom.xml diff --git a/flyway-test-extensions/flyway-spring4-test/pom.xml b/flyway-test-extensions/flyway-spring4-test/pom.xml index 7a517ad..2430f9d 100644 --- a/flyway-test-extensions/flyway-spring4-test/pom.xml +++ b/flyway-test-extensions/flyway-spring4-test/pom.xml @@ -20,7 +20,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../parent/pom.xml diff --git a/flyway-test-extensions/flyway-spring5-test/pom.xml b/flyway-test-extensions/flyway-spring5-test/pom.xml index 9d87a68..fff0d69 100644 --- a/flyway-test-extensions/flyway-spring5-test/pom.xml +++ b/flyway-test-extensions/flyway-spring5-test/pom.xml @@ -20,7 +20,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../parent/pom.xml diff --git a/flyway-test-extensions/flyway-spring6-test/pom.xml b/flyway-test-extensions/flyway-spring6-test/pom.xml index 84152b3..ccb95a0 100644 --- a/flyway-test-extensions/flyway-spring6-test/pom.xml +++ b/flyway-test-extensions/flyway-spring6-test/pom.xml @@ -20,7 +20,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../parent/pom.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit-spring4/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit-spring4/pom.xml index 0b627c7..28f2e5c 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit-spring4/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit-spring4/pom.xml @@ -21,7 +21,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../flyway-test-samples-parent/pom.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit/pom.xml index e871df0..29d7c72 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/flyway-test-sample-dbunit/pom.xml @@ -21,7 +21,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../flyway-test-samples-parent/pom.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/pom.xml index d7a6477..c35d26f 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-dbunit-samples/pom.xml @@ -21,13 +21,13 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../flyway-test-samples-parent/pom.xml org.flywaydb.flyway-test-extensions.samples.dbunit flyway-test-dbunit-samples - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT pom ${project.artifactId} diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-samples-parent/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-samples-parent/pom.xml index 5b755b2..01ae70e 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-samples-parent/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-samples-parent/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT pom ${project.artifactId} diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-junit5/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-junit5/pom.xml index fddc8c0..584706b 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-junit5/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-junit5/pom.xml @@ -22,7 +22,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../flyway-test-samples-parent/pom.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-7/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-7/pom.xml index b677568..cf8c478 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-7/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-7/pom.xml @@ -24,7 +24,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../../flyway-test-samples-parent/pom.xml @@ -46,7 +46,7 @@ org.flywaydb.flyway-test-extensions flyway-spring-test - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT test diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-ext/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-ext/pom.xml index 8ada371..98dbafc 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-ext/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-2-ext/pom.xml @@ -24,7 +24,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../../flyway-test-samples-parent/pom.xml @@ -45,7 +45,7 @@ org.flywaydb.flyway-test-extensions flyway-spring-test - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT test diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml index e906442..ccabef4 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml @@ -62,7 +62,7 @@ org.flywaydb.flyway-test-extensions flyway-spring-test - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT test diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring4/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring4/pom.xml index 3030d0d..5665d0b 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring4/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring4/pom.xml @@ -21,7 +21,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../flyway-test-samples-parent/pom.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring5/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring5/pom.xml index 449fd9f..5a1ce7d 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring5/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring5/pom.xml @@ -22,7 +22,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../flyway-test-samples-parent/pom.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-testng/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-testng/pom.xml index dade21e..8fd90da 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-testng/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-testng/pom.xml @@ -22,7 +22,7 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../../flyway-test-samples-parent/pom.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml index 2e21aa6..11df045 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml @@ -22,13 +22,13 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../flyway-test-samples-parent/pom.xml org.flywaydb.flyway-test-extensions.samples.spring flyway-test-spring-samples - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT pom ${project.artifactId} diff --git a/flyway-test-extensions/flyway-test-samples/pom.xml b/flyway-test-extensions/flyway-test-samples/pom.xml index 4cce5f3..1d995f1 100644 --- a/flyway-test-extensions/flyway-test-samples/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/pom.xml @@ -22,14 +22,14 @@ org.flywaydb.flyway-test-extensions.samples flyway-test-samples-parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT flyway-test-samples-parent/pom.xml org.flywaydb.flyway-test-extensions.samples flyway-test-samples - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT pom ${project.artifactId} diff --git a/flyway-test-extensions/flyway-test/pom.xml b/flyway-test-extensions/flyway-test/pom.xml index 3a4a716..2ae4bcb 100644 --- a/flyway-test-extensions/flyway-test/pom.xml +++ b/flyway-test-extensions/flyway-test/pom.xml @@ -23,7 +23,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT ../parent/pom.xml diff --git a/flyway-test-extensions/parent/pom.xml b/flyway-test-extensions/parent/pom.xml index 62e8fe8..8ae1f8a 100644 --- a/flyway-test-extensions/parent/pom.xml +++ b/flyway-test-extensions/parent/pom.xml @@ -20,7 +20,7 @@ 4.0.0 org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT pom Flyway-test-extensions ${project.artifactId} diff --git a/flyway-test-extensions/pom.xml b/flyway-test-extensions/pom.xml index 88f2c20..ef8bdd1 100644 --- a/flyway-test-extensions/pom.xml +++ b/flyway-test-extensions/pom.xml @@ -22,7 +22,7 @@ org.flywaydb.flyway-test-extensions parent - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT parent/pom.xml flyway-test-extensions From 1f719f5e2f105967dcffa4f1014aee1ab058fc4b Mon Sep 17 00:00:00 2001 From: FlorianGWE Date: Sun, 1 Oct 2023 19:16:07 +0200 Subject: [PATCH 2/3] update spring boot 3.0 exampe to spring boot 3.0.12 --- .../sample-spring-boot-3-0/pom.xml | 10 +++++----- flyway-test-extensions/parent/pom.xml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml index ccabef4..4eed5d1 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-0/pom.xml @@ -20,7 +20,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - 9.0.0-SNAPSHOT + 9.22.0-SNAPSHOT flyway-test-sample-spring-boot-3-0 Sample Flyway-Test-Extension Spring Boot 3.0 and Flyway 9 @@ -30,15 +30,15 @@ 17 17 - 3.0.5 - 6.0.7 - 9.16.1 + 3.0.11 + 6.0.12 + 9.22.2 org.springframework.boot spring-boot-starter-parent - 3.0.5 + 3.0.11 diff --git a/flyway-test-extensions/parent/pom.xml b/flyway-test-extensions/parent/pom.xml index 8ae1f8a..476f405 100644 --- a/flyway-test-extensions/parent/pom.xml +++ b/flyway-test-extensions/parent/pom.xml @@ -76,7 +76,7 @@ UTF-8 8.5.13 - 9.16.1 + 9.22.2 6.0.7 5.3.26 3.2.18.RELEASE From 57c73372b95c6e44f9181ed970271ae3eff857ce Mon Sep 17 00:00:00 2001 From: FlorianGWE Date: Sun, 1 Oct 2023 19:30:36 +0200 Subject: [PATCH 3/3] add a example spring boot 3.1 with Flyway 9.22 --- .../sample-spring-boot-3-1/pom.xml | 133 +++++++++++++ .../sample/test/spring/boot31/Person.java | 52 +++++ .../test/spring/boot31/PersonRepository.java | 24 +++ .../boot31/SampleFlywayApplication.java | 39 ++++ .../src/main/resources/application.properties | 18 ++ .../main/resources/db/migration/V1__init.sql | 23 +++ .../boot31/SampleFlywayApplicationTests.java | 41 ++++ .../flywaytest/FlywayTestApplicationTest.java | 69 +++++++ .../src/test/resources/application.properties | 18 ++ .../db/migration/V1.1.1__test_insert.sql | 18 ++ .../db/migration2/V1.1.2__test_insert.sql | 18 ++ .../src/test/resources/log4j.dtd | 182 ++++++++++++++++++ .../src/test/resources/log4j.xml | 42 ++++ .../flyway-test-spring-samples/pom.xml | 1 + 14 files changed, 678 insertions(+) create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/pom.xml create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/Person.java create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/PersonRepository.java create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplication.java create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/application.properties create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/db/migration/V1__init.sql create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplicationTests.java create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/flywaytest/FlywayTestApplicationTest.java create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/application.properties create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration/V1.1.1__test_insert.sql create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration2/V1.1.2__test_insert.sql create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.dtd create mode 100644 flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.xml diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/pom.xml new file mode 100644 index 0000000..a4b59c1 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/pom.xml @@ -0,0 +1,133 @@ + + + + 4.0.0 + 9.22.0-SNAPSHOT + + flyway-test-sample-spring-boot-3-1 + Sample Flyway-Test-Extension Spring Boot 3.1 and Flyway 9 + Sample Flyway-Test-Extension with Spring Boot 3.1.x + + + 17 + 17 + + 3.1.4 + 6.0.12 + 9.22.2 + + + + org.springframework.boot + spring-boot-starter-parent + 3.1.4 + + + + + + org.flywaydb + flyway-core + ${flyway.version} + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + + org.flywaydb.flyway-test-extensions + flyway-spring-test + 9.22.0-SNAPSHOT + test + + + org.springframework + spring-test + + + org.springframework + spring-jdbc + + + org.flywaydb + flyway-core + + + + + + org.hsqldb + hsqldb + runtime + + + + org.springframework.boot + spring-boot-starter-test + ${spring.boot.version} + test + + + org.springframework.boot + spring-boot-starter-logging + + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0 + + + **/*Tests.java + **/*Test.java + + + **/Abstract*.java + + + file:/dev/./urandom + true + + + + + + + diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/Person.java b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/Person.java new file mode 100644 index 0000000..f3025bc --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/Person.java @@ -0,0 +1,52 @@ +/** + * Copyright (C) 2011-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.flywaydb.sample.test.spring.boot31; + +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; + +@Entity +class Person { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + private String firstName; + private String lastName; + + public String getFirstName() { + return this.firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return this.lastName; + } + + public void setLastName(String lastname) { + this.lastName = lastname; + } + + @Override + public String toString() { + return "Person [firstName=" + this.firstName + ", lastName=" + this.lastName + + "]"; + } +} diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/PersonRepository.java b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/PersonRepository.java new file mode 100644 index 0000000..7045015 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/PersonRepository.java @@ -0,0 +1,24 @@ +/** + * Copyright (C) 2011-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.flywaydb.sample.test.spring.boot31; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface PersonRepository extends CrudRepository { + +} diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplication.java b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplication.java new file mode 100644 index 0000000..a05bb43 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplication.java @@ -0,0 +1,39 @@ +/** + * Copyright (C) 2011-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.flywaydb.sample.test.spring.boot31; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SampleFlywayApplication implements CommandLineRunner { + + @Autowired + private PersonRepository repository; + + @Override + public void run(String... args) throws Exception { + System.err.println(this.repository.findAll()); + } + + public static void main(String[] args) throws Exception { + SpringApplication.run(SampleFlywayApplication.class, args); + } +} + diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/application.properties b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/application.properties new file mode 100644 index 0000000..394630c --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/application.properties @@ -0,0 +1,18 @@ +# +# Copyright (C) 2011-2023 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +spring.jpa.hibernate.ddl-auto: none + diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/db/migration/V1__init.sql b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/db/migration/V1__init.sql new file mode 100644 index 0000000..638ba41 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/main/resources/db/migration/V1__init.sql @@ -0,0 +1,23 @@ +-- +-- Copyright (C) 2011-2023 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +CREATE TABLE PERSON ( + id BIGINT GENERATED BY DEFAULT AS IDENTITY , + first_name varchar(255) not null, + last_name varchar(255) not null +); + +insert into PERSON (first_name, last_name) values ('Dave', 'Syer'); \ No newline at end of file diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplicationTests.java b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplicationTests.java new file mode 100644 index 0000000..1fc15ea --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/SampleFlywayApplicationTests.java @@ -0,0 +1,41 @@ +/** + * Copyright (C) 2011-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.flywaydb.sample.test.spring.boot31; + +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.jdbc.core.JdbcTemplate; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; + +@SpringBootTest(classes = SampleFlywayApplication.class) +public class SampleFlywayApplicationTests { + + @Autowired + private JdbcTemplate template; + + @Test + public void testDefaultSettings() throws Exception { + /* assertThat(template.queryForObject( + "SELECT COUNT(*) from PERSON", Integer.class), + is(3)); + + */ + } + +} diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/flywaytest/FlywayTestApplicationTest.java b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/flywaytest/FlywayTestApplicationTest.java new file mode 100644 index 0000000..712b852 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/java/org/flywaydb/sample/test/spring/boot31/flywaytest/FlywayTestApplicationTest.java @@ -0,0 +1,69 @@ +/** + * Copyright (C) 2011-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.flywaydb.sample.test.spring.boot31.flywaytest; + +import org.flywaydb.sample.test.spring.boot31.SampleFlywayApplication; +import org.flywaydb.test.FlywayTestExecutionListener; +import org.flywaydb.test.annotation.FlywayTest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.test.annotation.Rollback; +import org.springframework.test.context.TestExecutionListeners; +import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.core.Is.is; + +@SpringBootTest(classes = SampleFlywayApplication.class) +@Rollback +@TestExecutionListeners({DependencyInjectionTestExecutionListener.class, FlywayTestExecutionListener.class}) +@FlywayTest +/** + * Show a spring-boot2 test configuration with {@link FlywayTest} annotation. + * + */ +public class FlywayTestApplicationTest { + + @Autowired + private JdbcTemplate template; + + @FlywayTest(invokeCleanDB = true) + @Test + public void singleLocation() throws Exception { + assertThat(template.queryForObject( + "SELECT COUNT(*) from PERSON", Integer.class), + is(3)); + } + + @FlywayTest(locationsForMigrate = {"/db/migration", "/db/migration2"}) + @Test + public void twoLocations() throws Exception { + assertThat(template.queryForObject( + "SELECT COUNT(*) from PERSON", Integer.class), + is(5)); + } + + @FlywayTest(invokeCleanDB = true) + @Test + public void singleLocation2() throws Exception { + assertThat(template.queryForObject( + "SELECT COUNT(*) from PERSON", Integer.class), + is(3)); + } + +} diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/application.properties b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/application.properties new file mode 100644 index 0000000..5e2f599 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/application.properties @@ -0,0 +1,18 @@ +# +# Copyright (C) 2011-2023 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# following is important for flywaydb-test-extension for doing a cleanDB operation +spring.flyway.clean-disabled=false \ No newline at end of file diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration/V1.1.1__test_insert.sql b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration/V1.1.1__test_insert.sql new file mode 100644 index 0000000..92297c0 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration/V1.1.1__test_insert.sql @@ -0,0 +1,18 @@ +-- +-- Copyright (C) 2011-2023 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into PERSON (first_name, last_name) values ('Florian', 'Eins'); +insert into PERSON (first_name, last_name) values ('Florian', 'Zwei'); \ No newline at end of file diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration2/V1.1.2__test_insert.sql b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration2/V1.1.2__test_insert.sql new file mode 100644 index 0000000..6f02891 --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/db/migration2/V1.1.2__test_insert.sql @@ -0,0 +1,18 @@ +-- +-- Copyright (C) 2011-2023 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into PERSON (first_name, last_name) values ('ptrzyna', 'Eins'); +insert into PERSON (first_name, last_name) values ('ptrzyna', 'Zwei'); \ No newline at end of file diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.dtd b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.dtd new file mode 100644 index 0000000..ddeab4b --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.dtd @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.xml new file mode 100644 index 0000000..a572bef --- /dev/null +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/flyway-test-sample-spring-boot/sample-spring-boot-3-1/src/test/resources/log4j.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml index 11df045..bdf0251 100644 --- a/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml +++ b/flyway-test-extensions/flyway-test-samples/flyway-test-spring-samples/pom.xml @@ -74,6 +74,7 @@ flyway-test-sample-spring-boot/sample-spring-boot-2-7 flyway-test-sample-spring-boot/sample-spring-boot-3-0 + flyway-test-sample-spring-boot/sample-spring-boot-3-1 flyway-test-junit5 flyway-test-testng