Skip to content

Commit

Permalink
Update Spring Boot to 3.1.0, dependencies, remove standalone and dock…
Browse files Browse the repository at this point in the history
…er image
  • Loading branch information
nkonev committed May 27, 2023
1 parent 48bea0b commit b7681a8
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 237 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ jobs:
(cd ./docker; docker-compose down -v; docker-compose up -d mssql postgresql)
pwd
ls -lah
./mvnw clean package -DenableStandaloneTests=true -DenableOomTests=true -DenableFuzzyStartMssqlTests=true
./mvnw clean package -DenableOomTests=true -DenableFuzzyStartMssqlTests=true
rm -rf ~/.m2/repository/name/nkonev/r2dbc-migrate
17 changes: 8 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>name.nkonev.r2dbc-migrate</groupId>
<artifactId>r2dbc-migrate-parent</artifactId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
<name>r2dbc-migrate parent project</name>
<description>R2DBC migration tool and library</description>
<packaging>pom</packaging>
Expand Down Expand Up @@ -36,9 +36,9 @@

<properties>
<java.version>17</java.version>
<spring.boot.version>3.0.0</spring.boot.version>
<spring.boot.version>3.1.0</spring.boot.version>
<maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version>
<testcontainers.version>1.17.2</testcontainers.version>
<testcontainers.version>1.18.1</testcontainers.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.encoding>${project.build.sourceEncoding}</maven.compiler.encoding>
Expand All @@ -51,11 +51,11 @@
<nexus.staging.plugin.version>1.6.13</nexus.staging.plugin.version>
<maven.gpg.plugin>3.0.1</maven.gpg.plugin>
<reflections.version>0.10.2</reflections.version>
<mssql.driver.version>1.0.0.RELEASE</mssql.driver.version>
<mysql.driver.version>1.0.0</mysql.driver.version>
<mariadb.driver.version>1.1.3</mariadb.driver.version>
<commons.io.version>2.11.0</commons.io.version>
<logcaptor.version>2.7.10</logcaptor.version>
<mssql.driver.version>1.0.1.RELEASE</mssql.driver.version>
<mysql.driver.version>1.0.1</mysql.driver.version>
<mariadb.driver.version>1.1.4</mariadb.driver.version>
<commons.io.version>2.12.0</commons.io.version>
<logcaptor.version>2.9.0</logcaptor.version>
</properties>

<modules>
Expand All @@ -64,7 +64,6 @@
<module>r2dbc-migrate-resource-reader-reflections</module>
<module>r2dbc-migrate-resource-reader-spring</module>
<module>r2dbc-migrate-spring-boot-starter</module>
<module>r2dbc-migrate-standalone</module>
</modules>

<dependencyManagement>
Expand Down
8 changes: 4 additions & 4 deletions r2dbc-migrate-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<parent>
<artifactId>r2dbc-migrate-parent</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<artifactId>r2dbc-migrate-resource-reader-api</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
Expand Down Expand Up @@ -95,13 +95,13 @@
<dependency>
<artifactId>r2dbc-migrate-resource-reader-reflections</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>r2dbc-migrate-resource-reader-spring</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion r2dbc-migrate-resource-reader-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>r2dbc-migrate-parent</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</parent>

</project>
4 changes: 2 additions & 2 deletions r2dbc-migrate-resource-reader-reflections/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<parent>
<artifactId>r2dbc-migrate-parent</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<artifactId>r2dbc-migrate-resource-reader-api</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions r2dbc-migrate-resource-reader-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<parent>
<artifactId>r2dbc-migrate-parent</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<artifactId>r2dbc-migrate-resource-reader-api</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
6 changes: 3 additions & 3 deletions r2dbc-migrate-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
<parent>
<artifactId>r2dbc-migrate-parent</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<artifactId>r2dbc-migrate-core</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</dependency>
<dependency>
<artifactId>r2dbc-migrate-resource-reader-spring</artifactId>
<groupId>name.nkonev.r2dbc-migrate</groupId>
<version>2.9.5-SNAPSHOT</version>
<version>2.10.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
7 changes: 0 additions & 7 deletions r2dbc-migrate-standalone/Dockerfile

This file was deleted.

132 changes: 0 additions & 132 deletions r2dbc-migrate-standalone/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions r2dbc-migrate-standalone/src/test/resources/application.properties

This file was deleted.

21 changes: 1 addition & 20 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Inspired by [this](https://spring.io/blog/2020/03/12/spring-boot-2-3-0-m3-availa
* Microsoft SQL Server
* H2
* MariaDB
* MySQL - see the new R2DBC 1.0-compatible [driver](https://github.com/asyncer-io/r2dbc-mysql)
* MySQL


It supports user-provided dialect. You can pass implementation of `SqlQueries` interface to the `migrate()` method. If you use Spring Boot, just define a bean of type `SqlQueries`. Example [SimplePostgresqlDialect](https://github.com/nkonev/r2dbc-migrate/blob/d65c7c49512a598dc4cc664bc33f78cb57ef3c43/r2dbc-migrate-core/src/test/java/name/nkonev/r2dbc/migrate/core/PostgresTestcontainersTest.java#L408).
Expand All @@ -25,7 +25,6 @@ It supports user-provided dialect. You can pass implementation of `SqlQueries` i
* Supports lock, that make you able to start number of replicas your microservice, without care of migrations collide each other. Database-specific lock tracking [issue](https://github.com/nkonev/r2dbc-migrate/issues/28).
* Each migration runs in the separated transaction by default
* It also supports `nontransactional` migrations, due to SQL Server 2017 prohibits `CREATE DATABASE` in the transaction
* Docker image
* First-class Spring Boot integration, see example below
* Also you can use this library without Spring (Boot), see library example below
* This library tends to be non-invasive, consequently it intentionally doesn't try to parse SQL and make some decisions relying on. So (in theory) you can freely update database and driver's version
Expand Down Expand Up @@ -92,21 +91,3 @@ See example [here](https://github.com/nkonev/r2dbc-migrate-example/tree/native).

## Library example
https://github.com/nkonev/r2dbc-migrate-example/tree/library

## docker-compose v3 example
```yml
version: '3.7'
services:
migrate:
image: nkonev/r2dbc-migrate:VERSION
environment:
_JAVA_OPTIONS: -Xmx128m
spring.r2dbc.url: "r2dbc:pool:mssql://mssqlcontainer:1433"
spring.r2dbc.username: sa
spring.r2dbc.password: "yourSuperStrong(!)Password"
r2dbc.migrate.resourcesPath: "file:/migrations/*.sql"
r2dbc.migrate.validationQuery: "SELECT collation_name as result FROM sys.databases WHERE name = N'master'"
r2dbc.migrate.validationQueryExpectedResultValue: "Cyrillic_General_CI_AS"
volumes:
- ./migrations:/migrations
```

0 comments on commit b7681a8

Please sign in to comment.