NIFI-9836: fix database selection during nifi registry startup (#5907)

This commit is contained in:
Zoltán Kornél Török 2022-03-29 17:32:21 +02:00 committed by GitHub
parent bf51687291
commit 2f501fcbe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -58,10 +58,10 @@ public class CustomFlywayConfiguration implements FlywayConfigurationCustomizer
final DatabaseType databaseType = getDatabaseType(configuration.getDataSource());
LOGGER.info("Determined database type is {}", databaseType.getName());
if (databaseType.equals(new MySQLDatabaseType())) {
if (databaseType instanceof MySQLDatabaseType) {
LOGGER.info("Setting migration locations to {}", Arrays.asList(LOCATIONS_MYSQL));
configuration.locations(LOCATIONS_MYSQL);
} else if (databaseType.equals(new PostgreSQLDatabaseType())) {
} else if (databaseType instanceof PostgreSQLDatabaseType) {
LOGGER.info("Setting migration locations to {}", Arrays.asList(LOCATIONS_POSTGRES));
configuration.locations(LOCATIONS_POSTGRES);
} else {