Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
0ae075ef
Commit
0ae075ef
authored
Jan 23, 2020
by
Kedar Joshi
Committed by
Stephane Nicoll
Jan 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Flyway 6.2.0
See gh-19894
parent
c624708c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
4 deletions
+30
-4
FlywayAutoConfiguration.java
...rk/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
+12
-1
FlywayProperties.java
...framework/boot/autoconfigure/flyway/FlywayProperties.java
+15
-1
FlywayPropertiesTests.java
...work/boot/autoconfigure/flyway/FlywayPropertiesTests.java
+2
-1
build.gradle
spring-boot-project/spring-boot-dependencies/build.gradle
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java
View file @
0ae075ef
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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.
...
...
@@ -218,6 +218,8 @@ public class FlywayAutoConfiguration {
.
to
((
oracleSqlplusWarn
)
->
configuration
.
oracleSqlplusWarn
(
oracleSqlplusWarn
));
map
.
from
(
properties
.
getStream
()).
whenNonNull
().
to
(
configuration:
:
stream
);
map
.
from
(
properties
.
getUndoSqlMigrationPrefix
()).
whenNonNull
().
to
(
configuration:
:
undoSqlMigrationPrefix
);
// No method reference for compatibility with Flyway version < 6.2
configureValidateMigrationNaming
(
configuration
,
properties
.
isValidateMigrationNaming
());
}
private
void
configureCallbacks
(
FluentConfiguration
configuration
,
List
<
Callback
>
callbacks
)
{
...
...
@@ -243,6 +245,15 @@ public class FlywayAutoConfiguration {
}
}
private
void
configureValidateMigrationNaming
(
FluentConfiguration
flyway
,
boolean
isValidateMigrationNaming
)
{
try
{
flyway
.
validateMigrationNaming
(
isValidateMigrationNaming
);
}
catch
(
NoSuchMethodError
ex
)
{
// Flyway < v6.2
}
}
private
String
getProperty
(
Supplier
<
String
>
property
,
Supplier
<
String
>
defaultValue
)
{
String
value
=
property
.
get
();
return
(
value
!=
null
)
?
value
:
defaultValue
.
get
();
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java
View file @
0ae075ef
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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.
...
...
@@ -209,6 +209,12 @@ public class FlywayProperties {
*/
private
boolean
ignoreFutureMigrations
=
true
;
/**
* Whether to validate migrations and callbacks whose scripts do not obey the correct
* naming convention.
*/
private
boolean
validateMigrationNaming
=
false
;
/**
* Whether to allow mixing transactional and non-transactional statements within the
* same migration.
...
...
@@ -549,6 +555,14 @@ public class FlywayProperties {
this
.
ignoreFutureMigrations
=
ignoreFutureMigrations
;
}
public
boolean
isValidateMigrationNaming
()
{
return
this
.
validateMigrationNaming
;
}
public
void
setValidateMigrationNaming
(
boolean
validateMigrationNaming
)
{
this
.
validateMigrationNaming
=
validateMigrationNaming
;
}
public
boolean
isMixed
()
{
return
this
.
mixed
;
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/flyway/FlywayPropertiesTests.java
View file @
0ae075ef
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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.
...
...
@@ -80,6 +80,7 @@ class FlywayPropertiesTests {
assertThat
(
configuration
.
isIgnoreIgnoredMigrations
()).
isEqualTo
(
properties
.
isIgnoreIgnoredMigrations
());
assertThat
(
configuration
.
isIgnorePendingMigrations
()).
isEqualTo
(
properties
.
isIgnorePendingMigrations
());
assertThat
(
configuration
.
isIgnoreFutureMigrations
()).
isEqualTo
(
properties
.
isIgnoreFutureMigrations
());
assertThat
(
configuration
.
isValidateMigrationNaming
()).
isEqualTo
(
properties
.
isValidateMigrationNaming
());
assertThat
(
configuration
.
isMixed
()).
isEqualTo
(
properties
.
isMixed
());
assertThat
(
configuration
.
isOutOfOrder
()).
isEqualTo
(
properties
.
isOutOfOrder
());
assertThat
(
configuration
.
isSkipDefaultCallbacks
()).
isEqualTo
(
properties
.
isSkipDefaultCallbacks
());
...
...
spring-boot-project/spring-boot-dependencies/build.gradle
View file @
0ae075ef
...
...
@@ -335,7 +335,7 @@ bom {
]
}
}
library
(
"Flyway"
,
"6.
1.3
"
)
{
library
(
"Flyway"
,
"6.
2.0
"
)
{
group
(
"org.flywaydb"
)
{
modules
=
[
"flyway-core"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment