Skip to content

Commit 1019797

Browse files
rg-buildmonkeyJasonLuo-Redgate
authored andcommitted
Bump version to flyway-11.5.0
Please see the GH release for the release notes
1 parent 4615932 commit 1019797

File tree

56 files changed

+163
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+163
-89
lines changed

documentation/Release notes and older versions/Release Notes for Flyway Engine.html

+26
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@
77

88
</div>
99
<div class="col-md-9">
10+
<div class="release">
11+
<h2 id="11.4.1">Flyway 11.4.1 (2025-03-21)</h2>
12+
13+
<h3>Bug fixes</h3>
14+
<ul>
15+
<li>Rule and configuration TOML files now support a BOM character at the start of the file</li>
16+
</ul>
17+
18+
<h3>New features</h3>
19+
<ul>
20+
<li>Added support for change reports to projects deploying from a Schema model. This can be enabled by setting '-check.changesSource=schemaModel' when running 'check -changes'</li>
21+
<li>(preview) add support for migration tags. Tags can be used to cherry pick groups of migrations.</li>
22+
</ul>
23+
24+
<h3>Java compatibility</h3>
25+
<ul>
26+
<li>Update Snowflake to 3.23.1 to fix CVE-2025-27496</li>
27+
</ul>
28+
29+
<h3>Library upgrades</h3>
30+
<ul>
31+
<li>Upgraded RgCompare.Cli from 1.29.0.25860 to 1.30.0.25967</li>
32+
</ul>
33+
34+
</div>
35+
1036

1137
<div class="release">
1238
<h2 id="11.4.0">Flyway 11.4.0 (2025-03-12)</h2>

documentation/_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
flywayVersion: 11.4.1
1+
flywayVersion: 11.5.0
22
enterpriseUrl: https://download.red-gate.com/maven/release/com/redgate/flyway
33
kramdown:
44
smart_quotes: ["apos", "apos", "quot", "quot"]

flyway-commandline/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.flywaydb</groupId>
66
<artifactId>flyway-parent</artifactId>
7-
<version>11.4.1</version>
7+
<version>11.5.0</version>
88
</parent>
99
<artifactId>flyway-commandline</artifactId>
1010
<packaging>jar</packaging>

flyway-commandline/src/main/assembly/flyway

+2-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ else
2323
if [ -z "$JAVA_HOME" ]; then JAVA_CMD=java; else JAVA_CMD=$JAVA_HOME/bin/java; fi
2424
fi
2525

26-
if [ -n "$FLYWAY_NATIVE_CONNECTORS" ] && [ "$FLYWAY_NATIVE_CONNECTORS" == "false" ]; then
27-
CP="$CLASSPATH:$INSTALLDIR/lib/*:$INSTALLDIR/lib/aad/*:$INSTALLDIR/lib/plugins/*:$INSTALLDIR/lib/oracle_wallet/*:$INSTALLDIR/lib/flyway/*:$INSTALLDIR/lib/netty/*:$INSTALLDIR/lib/opentelemetry/*:$INSTALLDIR/drivers/*:$INSTALLDIR/drivers/gcp/*:$INSTALLDIR/drivers/cassandra/*"
28-
else
29-
CP="$CLASSPATH:$INSTALLDIR/lib/*:$INSTALLDIR/lib/aad/*:$INSTALLDIR/lib/plugins/*:$INSTALLDIR/lib/oracle_wallet/*:$INSTALLDIR/lib/flyway/*:$INSTALLDIR/lib/netty/*:$INSTALLDIR/lib/opentelemetry/*:$INSTALLDIR/drivers/*:$INSTALLDIR/drivers/gcp/*:$INSTALLDIR/drivers/cassandra/*:$INSTALLDIR/drivers/mongo/*"
30-
fi
26+
27+
CP="$CLASSPATH:$INSTALLDIR/lib/*:$INSTALLDIR/lib/aad/*:$INSTALLDIR/lib/plugins/*:$INSTALLDIR/lib/oracle_wallet/*:$INSTALLDIR/lib/flyway/*:$INSTALLDIR/lib/netty/*:$INSTALLDIR/lib/opentelemetry/*:$INSTALLDIR/drivers/*:$INSTALLDIR/drivers/gcp/*:$INSTALLDIR/drivers/cassandra/*:$INSTALLDIR/drivers/mongo/*"
3128

3229

3330
EXTRA_ARGS=

flyway-commandline/src/main/assembly/flyway.cmd

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ if "%JAVA_ARGS%"=="" (
2121
set JAVA_ARGS=
2222
)
2323

24-
if "%FLYWAY_NATIVE_CONNECTORS%"=="false" (
25-
%JAVA_CMD% -Djava.library.path="%INSTALLDIR%\native" %JAVA_ARGS% -cp "%CLASSPATH%;%INSTALLDIR%\lib\*;%INSTALLDIR%\lib\plugins\*;%INSTALLDIR%\lib\aad\*;%INSTALLDIR%\lib\oracle_wallet\*;%INSTALLDIR%\lib\flyway\*;%INSTALLDIR%\lib\netty\*;%INSTALLDIR%\lib\opentelemetry\*;%INSTALLDIR%\drivers\*;%INSTALLDIR%\drivers\gcp\*;%INSTALLDIR%\drivers\cassandra\*" org.flywaydb.commandline.Main %*
26-
) else (
27-
%JAVA_CMD% -Djava.library.path="%INSTALLDIR%\native" %JAVA_ARGS% -cp "%CLASSPATH%;%INSTALLDIR%\lib\*;%INSTALLDIR%\lib\plugins\*;%INSTALLDIR%\lib\aad\*;%INSTALLDIR%\lib\oracle_wallet\*;%INSTALLDIR%\lib\flyway\*;%INSTALLDIR%\lib\netty\*;%INSTALLDIR%\lib\opentelemetry\*;%INSTALLDIR%\drivers\*;%INSTALLDIR%\drivers\gcp\*;%INSTALLDIR%\drivers\cassandra\*;%INSTALLDIR%\drivers\mongo\*" org.flywaydb.commandline.Main %*
28-
)
24+
%JAVA_CMD% -Djava.library.path="%INSTALLDIR%\native" %JAVA_ARGS% -cp "%CLASSPATH%;%INSTALLDIR%\lib\*;%INSTALLDIR%\lib\plugins\*;%INSTALLDIR%\lib\aad\*;%INSTALLDIR%\lib\oracle_wallet\*;%INSTALLDIR%\lib\flyway\*;%INSTALLDIR%\lib\netty\*;%INSTALLDIR%\lib\opentelemetry\*;%INSTALLDIR%\drivers\*;%INSTALLDIR%\drivers\gcp\*;%INSTALLDIR%\drivers\cassandra\*;%INSTALLDIR%\drivers\mongo\*" org.flywaydb.commandline.Main %*
2925

3026
@REM Exit using the same code returned from Java
3127
EXIT /B %ERRORLEVEL%

flyway-core/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.flywaydb</groupId>
66
<artifactId>flyway-parent</artifactId>
7-
<version>11.4.1</version>
7+
<version>11.5.0</version>
88
</parent>
99
<artifactId>flyway-core</artifactId>
1010
<packaging>jar</packaging>

flyway-core/src/main/java/org/flywaydb/core/Flyway.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public MigrateResult migrate() throws FlywayException {
206206
LOG.warn("The configuration option 'createSchemas' is false.\n" +
207207
"However, the schema history table still needs a schema to reside in.\n" +
208208
"You must manually create a schema for the schema history table to reside in.\n" +
209-
"See https://documentation.red-gate.com/fd/migrations-184127470.html");
209+
"See " + FlywayDbWebsiteLinks.MIGRATIONS);
210210
}
211211

212212
if (!schemaHistory.exists()) {
@@ -415,7 +415,7 @@ public BaselineResult baseline() throws FlywayException {
415415
LOG.warn("The configuration option 'createSchemas' is false.\n" +
416416
"Even though Flyway is configured not to create any schemas, the schema history table still needs a schema to reside in.\n" +
417417
"You must manually create a schema for the schema history table to reside in.\n" +
418-
"See https://documentation.red-gate.com/fd/migrations-184127470.html");
418+
"See " + FlywayDbWebsiteLinks.MIGRATIONS);
419419
}
420420

421421
BaselineResult baselineResult = doBaseline(schemaHistory, callbackExecutor, database);

flyway-core/src/main/java/org/flywaydb/core/experimental/ExperimentalDatabase.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public sealed interface ExperimentalDatabase <T> extends Plugin, AutoCloseable p
5353
default boolean canCreateJdbcDataSource() {
5454
return false;
5555
}
56-
default boolean isOnByDefault() {
56+
57+
default boolean isOnByDefault(final Configuration configuration) {
5758
return false;
5859
}
5960

@@ -84,7 +85,7 @@ default boolean isOnByDefault() {
8485
* The implementation details will be determined per database but will adhere to a Flyway standard.
8586
* @param tableName The name of the schema history table to create.
8687
*/
87-
void createSchemaHistoryTable(String tableName);
88+
void createSchemaHistoryTable(Configuration configuration);
8889

8990
boolean schemaHistoryTableExists(String tableName);
9091

@@ -220,12 +221,12 @@ default String getInstalledBy(final Configuration configuration) {
220221
return installedBy == null ? getCurrentUser() : installedBy;
221222
}
222223

223-
default void createSchemaHistoryTableIfNotExists(final String tableName) {
224-
if (!schemaHistoryTableExists(tableName)) {
224+
default void createSchemaHistoryTableIfNotExists(final Configuration configuration) {
225+
if (!schemaHistoryTableExists(configuration.getTable())) {
225226
LOG.info("Creating Schema History table "
226-
+ quote(getCurrentSchema(), tableName)
227+
+ quote(getCurrentSchema(), configuration.getTable())
227228
+ " ...");
228-
createSchemaHistoryTable(tableName);
229+
createSchemaHistoryTable(configuration);
229230
}
230231
}
231232

flyway-core/src/main/java/org/flywaydb/core/experimental/ExperimentalJdbc.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ public SchemaHistoryModel getSchemaHistoryModel(final String table) {
235235
}
236236

237237
@Override
238-
public void createSchemaHistoryTable(final String tableName) {
238+
public void createSchemaHistoryTable(final Configuration configuration) {
239239
try (final Statement statement = connection.createStatement()) {
240240
final String createSql = "CREATE TABLE "
241-
+ getTableNameWithSchema(tableName)
241+
+ getTableNameWithSchema(configuration.getTable())
242242
+ " (\n"
243243
+ doQuote("installed_rank") + " INT NOT NULL PRIMARY KEY,\n"
244244
+ doQuote("version") + " VARCHAR(50),\n"

flyway-core/src/main/java/org/flywaydb/core/experimental/ExperimentalModeUtils.java

+7-14
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,13 @@
2323
import lombok.CustomLog;
2424
import org.flywaydb.core.FlywayTelemetryManager;
2525
import org.flywaydb.core.api.configuration.Configuration;
26-
import org.flywaydb.core.extensibility.LicenseGuard;
2726
import org.flywaydb.core.internal.configuration.ConfigurationValidator;
2827

2928
@CustomLog
3029
public class ExperimentalModeUtils {
3130

32-
private static boolean isExperimentalModeActivated(final Configuration configuration) {
33-
if ("OSS".equals(LicenseGuard.getTierAsString(configuration))) {
34-
return isNativeConnectorsNotTurnedOff();
35-
}
36-
return isNativeConnectorsTurnedOn();
37-
}
38-
3931
public static boolean canUseExperimentalMode(final Configuration config, final String verb) {
40-
if (!isExperimentalModeActivated(config)) {
32+
if (isNativeConnectorsTurnedOff()) {
4133
return false;
4234
}
4335

@@ -55,7 +47,7 @@ public static boolean canUseExperimentalMode(final Configuration config, final
5547
Optional<ExperimentalDatabase> database = resolveExperimentalDatabasePlugin(config);
5648

5749
return database.map(experimentalDatabase -> experimentalDatabase.supportedVerbs().contains(verb) &&
58-
(experimentalDatabase.isOnByDefault() || isNativeConnectorsTurnedOn()))
50+
(experimentalDatabase.isOnByDefault(config) || isNativeConnectorsTurnedOn()))
5951
.orElse(false);
6052
}
6153

@@ -64,14 +56,15 @@ public static boolean canCreateDataSource(final Configuration config) {
6456
return true;
6557
}
6658

67-
if (isExperimentalModeActivated(config)) {
59+
if (!isNativeConnectorsTurnedOff()) {
6860
if (config.getUrl() == null) {
6961
return true;
7062
}
7163

7264
Optional<ExperimentalDatabase> database = resolveExperimentalDatabasePlugin(config);
7365

74-
return database.map(ExperimentalDatabase::canCreateJdbcDataSource)
66+
return database.map(experimentalDatabase -> experimentalDatabase.canCreateJdbcDataSource()
67+
|| !experimentalDatabase.isOnByDefault(config))
7568
.orElse(true);
7669
}
7770

@@ -97,7 +90,7 @@ private static boolean isNativeConnectorsTurnedOn() {
9790
return System.getenv("FLYWAY_NATIVE_CONNECTORS") != null && System.getenv("FLYWAY_NATIVE_CONNECTORS").equalsIgnoreCase("true");
9891
}
9992

100-
private static boolean isNativeConnectorsNotTurnedOff() {
101-
return System.getenv("FLYWAY_NATIVE_CONNECTORS") == null || System.getenv("FLYWAY_NATIVE_CONNECTORS").equalsIgnoreCase("true");
93+
private static boolean isNativeConnectorsTurnedOff() {
94+
return System.getenv("FLYWAY_NATIVE_CONNECTORS") != null && System.getenv("FLYWAY_NATIVE_CONNECTORS").equalsIgnoreCase("false");
10295
}
10396
}

flyway-core/src/main/java/org/flywaydb/core/internal/util/FlywayDbWebsiteLinks.java

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public class FlywayDbWebsiteLinks {
6363
public static final String TOML_HELP = "https://rd.gt/45ynYIt";
6464
public static final String EULA_LINK = "https://www.red-gate.com/eula";
6565
public static final String COMMUNITY_SUPPORT = "https://rd.gt/468B6ni";
66+
public static final String MIGRATIONS = "https://rd.gt/4iUkpm1";
6667

6768
public static final String ENTERPRISE_INFO = "https://www.red-gate.com/products/flyway/enterprise/";
6869
public static final String RELEASE_NOTES = "https://rd.gt/416ObMi";

flyway-database/flyway-database-cassandra/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-db2/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-derby/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-hsqldb/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-informix/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-mongodb/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-nc-mongodb/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-nc-mongodb/src/main/java/org/flywaydb/database/nc/mongodb/MongoDBDatabase.java

+16-6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import org.flywaydb.core.experimental.MetaData;
5454
import org.flywaydb.core.experimental.schemahistory.SchemaHistoryItem;
5555
import org.flywaydb.core.experimental.schemahistory.SchemaHistoryModel;
56+
import org.flywaydb.core.extensibility.LicenseGuard;
5657
import org.flywaydb.core.extensibility.TLSConnectionHelper;
5758
import org.flywaydb.core.internal.configuration.ConfigUtils;
5859
import org.flywaydb.core.internal.configuration.models.ResolvedEnvironment;
@@ -89,8 +90,9 @@ public List<String> supportedVerbs() {
8990
}
9091

9192
@Override
92-
public boolean isOnByDefault() {
93-
return true;
93+
public boolean isOnByDefault(final Configuration configuration) {
94+
boolean isOSS = "OSS".equals(LicenseGuard.getTierAsString(configuration));
95+
return isOSS || checkMongoshInstalled(true);
9496
}
9597

9698
@Override
@@ -118,7 +120,7 @@ public void initialize(final ResolvedEnvironment environment, final Configuratio
118120
}
119121

120122
if (connectionType == ConnectionType.EXECUTABLE) {
121-
checkMongoshInstalled();
123+
checkMongoshInstalled(false);
122124
mongoshCredential = new MongoshCredential(environment.getUrl(),
123125
environment.getUser(),
124126
environment.getPassword());
@@ -191,8 +193,8 @@ public MetaData getDatabaseMetaData() {
191193
}
192194

193195
@Override
194-
public void createSchemaHistoryTable(final String tableName) {
195-
mongoDatabase.createCollection(tableName);
196+
public void createSchemaHistoryTable(Configuration configuration) {
197+
mongoDatabase.createCollection(configuration.getTable());
196198
doesSchemaHistoryTableExist = true;
197199
}
198200

@@ -440,7 +442,7 @@ private void doExecuteWithMongosh(final String executionUnit, final boolean outp
440442
}
441443
}
442444

443-
private void checkMongoshInstalled() {
445+
private boolean checkMongoshInstalled(final boolean silent) {
444446
List<String> commands = Arrays.asList("mongosh", "--version");
445447
LOG.debug("Executing " + String.join(" ", commands));
446448
final ProcessBuilder processBuilder = new ProcessBuilder(commands);
@@ -449,13 +451,21 @@ private void checkMongoshInstalled() {
449451
processBuilder.start();
450452
} catch (final Exception e) {
451453
if (DockerUtils.isContainer()) {
454+
if (silent) {
455+
return false;
456+
}
452457
throw new FlywayException(
453458
"Mongosh is not installed on this docker image. Please use the Mongo docker image on our repository: "
454459
+ FlywayDbWebsiteLinks.OSS_DOCKER_REPOSITORY);
455460
}
461+
if (silent) {
462+
return false;
463+
}
456464
throw new FlywayException(
457465
"Mongosh is required for .js migrations and is not currently installed. Information on how to install Mongosh can be found here: "
458466
+ FlywayDbWebsiteLinks.MONGOSH);
459467
}
468+
469+
return true;
460470
}
461471
}

flyway-database/flyway-database-oracle/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-postgresql/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-redshift/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
99
<relativePath>../../pom.xml</relativePath>
10-
<version>11.4.1</version>
10+
<version>11.5.0</version>
1111
</parent>
1212

1313
<artifactId>flyway-database-redshift</artifactId>

flyway-database/flyway-database-saphana/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

flyway-database/flyway-database-snowflake/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.flywaydb</groupId>
88
<artifactId>flyway-parent</artifactId>
9-
<version>11.4.1</version>
9+
<version>11.5.0</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

0 commit comments

Comments
 (0)