Skip to content

Commit 9c6dcd9

Browse files
committed
3.2.0
1 parent 734edc3 commit 9c6dcd9

File tree

6 files changed

+35
-5
lines changed

6 files changed

+35
-5
lines changed

Diff for: pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
1515
<maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version>
1616
<java.version>17</java.version>
17-
<r2dbc-migrate.version>3.1.2</r2dbc-migrate.version>
17+
<r2dbc-migrate.version>3.2.0</r2dbc-migrate.version>
1818
</properties>
1919

2020
<dependencyManagement>

Diff for: src/main/resources/application.yml

+13
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,16 @@ spring:
1111
statement_timeout: 40000
1212
idle_in_transaction_session_timeout: 40000
1313
connectTimeout: PT55S
14+
15+
# you can entirely remove these settings and r2dbc-migrate will automatically execute files from "classpath:/db/migration/*.sql"
16+
r2dbc:
17+
migrate:
18+
resources:
19+
- resourcesPaths:
20+
- classpath:/db/migration/*.sql
21+
- version: 6
22+
description: "additional"
23+
substitute: true
24+
resources-paths:
25+
- "classpath:/db/additional/file.sql"
26+

Diff for: src/main/resources/db/additional/file.sql

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
INSERT INTO customer (first_name, last_name)
2+
VALUES
3+
('222 Current User', '${USER}'),
4+
('222 Current OS', '${os.name}')
5+
;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
INSERT INTO customer (first_name, last_name)
2+
VALUES
3+
('Current User', '${USER}'),
4+
('Current OS', '${os.name}')
5+
;

Diff for: src/test/java/name/nkonev/r2dbc/migrate/example/CustomerApplicationTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ void shouldGetCustomers() {
2424
.exchange()
2525
.expectStatus().isOk()
2626
.expectBodyList(Customer.class)
27-
.value(List::size, equalTo(4))
27+
.value(List::size, equalTo(8))
2828
.value(customers -> customers.get(0).getFirstName(), equalTo("Test Customer Name 1"))
2929
.value(customers -> customers.get(1).getFirstName(), equalTo("Funny User Name 2"))
3030
.value(customers -> customers.get(2).getLastName(), equalTo("Unicode escape as workaround"))
31-
.value(customers -> customers.get(3).getFirstName(), equalTo("Only Test"))
31+
.value(customers -> customers.get(7).getFirstName(), equalTo("Only Test"))
3232
;
3333
}
3434

Diff for: src/test/resources/application.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ spring:
77
idle_in_transaction_session_timeout: 40000
88
connectTimeout: PT55S
99

10+
# you can entirely remove these settings and r2dbc-migrate will automatically execute files from "classpath:/db/migration/*.sql"
1011
r2dbc:
1112
migrate:
1213
resources:
1314
- resourcesPaths:
14-
- classpath:/db/migration/*.sql
15-
- classpath:/test/migration/*.sql
15+
- classpath:/db/migration/*.sql
16+
- classpath:/test/migration/*.sql
17+
- version: 6
18+
description: "additional"
19+
substitute: true
20+
resources-paths:
21+
- "classpath:/db/additional/file.sql"
22+

0 commit comments

Comments
 (0)