mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-09 02:49:02 +00:00
Upgrade to Flyway 11.10.3
Closes gh-46496
This commit is contained in:
+2
@@ -297,6 +297,8 @@ public class FlywayAutoConfiguration {
|
||||
.to((prefix) -> configuration.scriptPlaceholderPrefix(prefix));
|
||||
map.from(properties.getScriptPlaceholderSuffix())
|
||||
.to((suffix) -> configuration.scriptPlaceholderSuffix(suffix));
|
||||
map.from(properties.getPowershellExecutable())
|
||||
.to((powershellExecutable) -> configuration.powershellExecutable(powershellExecutable));
|
||||
configureExecuteInTransaction(configuration, properties, map);
|
||||
map.from(properties::getLoggers).to((loggers) -> configuration.loggers(loggers));
|
||||
map.from(properties::getCommunityDbSupportEnabled)
|
||||
|
||||
+14
@@ -258,6 +258,12 @@ public class FlywayProperties {
|
||||
*/
|
||||
private String scriptPlaceholderSuffix = "__";
|
||||
|
||||
/**
|
||||
* PowerShell executable to use for running PowerShell scripts. Default to
|
||||
* "powershell" on Windows, "pwsh" on other platforms.
|
||||
*/
|
||||
private String powershellExecutable;
|
||||
|
||||
/**
|
||||
* Whether Flyway should execute SQL within a transaction.
|
||||
*/
|
||||
@@ -661,6 +667,14 @@ public class FlywayProperties {
|
||||
this.scriptPlaceholderSuffix = scriptPlaceholderSuffix;
|
||||
}
|
||||
|
||||
public String getPowershellExecutable() {
|
||||
return this.powershellExecutable;
|
||||
}
|
||||
|
||||
public void setPowershellExecutable(String powershellExecutable) {
|
||||
this.powershellExecutable = powershellExecutable;
|
||||
}
|
||||
|
||||
public boolean isExecuteInTransaction() {
|
||||
return this.executeInTransaction;
|
||||
}
|
||||
|
||||
+8
@@ -748,6 +748,14 @@ class FlywayAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void powershellExecutableIsCorrectlyMapped() {
|
||||
this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
|
||||
.withPropertyValues("spring.flyway.powershell-executable=my-pwsh")
|
||||
.run((context) -> assertThat(context.getBean(Flyway.class).getConfiguration().getPowershellExecutable())
|
||||
.isEqualTo("my-pwsh"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void postgresqlExtensionIsNotLoadedByDefault() {
|
||||
FluentConfiguration configuration = mock(FluentConfiguration.class);
|
||||
|
||||
+1
@@ -71,6 +71,7 @@ class FlywayPropertiesTests {
|
||||
assertThat(properties.getPlaceholderPrefix()).isEqualToIgnoringWhitespace(configuration.getPlaceholderPrefix());
|
||||
assertThat(properties.getPlaceholderSuffix()).isEqualTo(configuration.getPlaceholderSuffix());
|
||||
assertThat(properties.isPlaceholderReplacement()).isEqualTo(configuration.isPlaceholderReplacement());
|
||||
assertThat(properties.getPowershellExecutable()).isEqualTo(configuration.getPowershellExecutable());
|
||||
assertThat(properties.getSqlMigrationPrefix()).isEqualTo(configuration.getSqlMigrationPrefix());
|
||||
assertThat(properties.getSqlMigrationSuffixes()).containsExactly(configuration.getSqlMigrationSuffixes());
|
||||
assertThat(properties.getSqlMigrationSeparator()).isEqualTo(configuration.getSqlMigrationSeparator());
|
||||
|
||||
@@ -383,7 +383,7 @@ bom {
|
||||
javadoc("elasticsearch-rest-client-sniffer", version -> "https://artifacts.elastic.co/javadoc/org/elasticsearch/client/elasticsearch-rest-client-sniffer/%s".formatted(version), "org.elasticsearch.client.sniff")
|
||||
}
|
||||
}
|
||||
library("Flyway", "11.10.1") {
|
||||
library("Flyway", "11.10.3") {
|
||||
group("org.flywaydb") {
|
||||
modules = [
|
||||
"flyway-commandline",
|
||||
|
||||
Reference in New Issue
Block a user