Skip to content

Commit

Permalink
Bump flyway.version from 8.5.13 to 9.0.4
Browse files Browse the repository at this point in the history
Bumps `flyway.version` from 8.5.13 to 9.0.4.

Updates `flyway-core` from 8.5.13 to 9.0.4
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](flyway/flyway@flyway-8.5.13...flyway-9.0.4)

Updates `flyway-sqlserver` from 8.5.13 to 9.0.4
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](flyway/flyway@flyway-8.5.13...flyway-9.0.4)

Updates `flyway-mysql` from 8.5.13 to 9.0.4
- [Release notes](https://github.com/flyway/flyway/releases)
- [Commits](flyway/flyway@flyway-8.5.13...flyway-9.0.4)

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-core
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: org.flywaydb:flyway-sqlserver
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: org.flywaydb:flyway-mysql
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
  • Loading branch information
dependabot[bot] authored and gastaldi committed Aug 2, 2022
1 parent c6ed339 commit b0bb48e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<maven-invoker.version>3.2.0</maven-invoker.version>
<awaitility.version>4.2.0</awaitility.version>
<jboss-logmanager.version>1.0.10</jboss-logmanager.version>
<flyway.version>8.5.13</flyway.version>
<flyway.version>9.0.4</flyway.version>
<yasson.version>1.0.11</yasson.version>
<liquibase.version>4.14.0</liquibase.version>
<snakeyaml.version>1.30</snakeyaml.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.deployment.logging.LoggingSetupBuildItem;
import io.quarkus.deployment.recording.RecorderContext;
import io.quarkus.flyway.runtime.FlywayBuildTimeConfig;
Expand Down Expand Up @@ -289,6 +290,11 @@ public NativeImageResourceBuildItem resources() {
return new NativeImageResourceBuildItem("org/flywaydb/database/version.txt");
}

@BuildStep
public ServiceProviderBuildItem flywayPlugins() {
return ServiceProviderBuildItem.allProvidersFromClassPath("org.flywaydb.core.extensibility.Plugin");
}

public static final class MigrationStateBuildItem extends SimpleBuildItem {

final Set<String> hasMigrations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ public Integer getChecksum() {
return null;
}

@Override
public boolean isUndo() {
return false;
}

@Override
public boolean canExecuteInTransaction() {
return true;
Expand All @@ -94,11 +89,6 @@ public void migrate(Context context) throws Exception {
statement.executeUpdate("INSERT INTO quarked_flyway VALUES (1002, 'test')");
}
}

@Override
public boolean isBaselineMigration() {
return false;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ public Integer getChecksum() {
return null;
}

@Override
public boolean isUndo() {
return false;
}

@Override
public boolean canExecuteInTransaction() {
return true;
Expand All @@ -100,11 +95,6 @@ public void migrate(Context context) throws Exception {
statement.executeUpdate("INSERT INTO quarked_flyway VALUES (1002, 'test')");
}
}

@Override
public boolean isBaselineMigration() {
return false;
}
}

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package io.quarkus.flyway.runtime;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

import javax.sql.DataSource;

Expand Down Expand Up @@ -57,8 +59,17 @@ public Flyway createFlyway(DataSource dataSource) {
configure.cleanDisabled(flywayRuntimeConfig.cleanDisabled);
configure.baselineOnMigrate(flywayRuntimeConfig.baselineOnMigrate);
configure.validateOnMigrate(flywayRuntimeConfig.validateOnMigrate);
configure.ignoreMissingMigrations(flywayRuntimeConfig.ignoreMissingMigrations);
configure.ignoreFutureMigrations(flywayRuntimeConfig.ignoreFutureMigrations);
configure.validateMigrationNaming(true);
List<String> patterns = new ArrayList<>(2);
//https://flywaydb.org/documentation/configuration/parameters/ignoreMigrationPatterns
if (flywayRuntimeConfig.ignoreMissingMigrations) {
patterns.add("*:Missing");
}
if (flywayRuntimeConfig.ignoreFutureMigrations) {
patterns.add("*:Future");
}
// Default is *:Future
configure.ignoreMigrationPatterns(patterns.toArray(new String[0]));
configure.cleanOnValidationError(flywayRuntimeConfig.cleanOnValidationError);
configure.outOfOrder(flywayRuntimeConfig.outOfOrder);
if (flywayRuntimeConfig.baselineVersion.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.flywaydb.core.Flyway;
import org.flywaydb.core.api.Location;
import org.flywaydb.core.api.configuration.Configuration;
import org.flywaydb.core.internal.util.ValidatePatternUtils;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -200,23 +201,23 @@ void testOutOfOrder() {
void testIgnoreMissingMigrations() {
runtimeConfig.ignoreMissingMigrations = false;
creator = new FlywayCreator(runtimeConfig, buildConfig);
assertFalse(createdFlywayConfig().isIgnoreMissingMigrations());
assertFalse(ValidatePatternUtils.isMissingIgnored(createdFlywayConfig().getIgnoreMigrationPatterns()));

runtimeConfig.ignoreMissingMigrations = true;
creator = new FlywayCreator(runtimeConfig, buildConfig);
assertTrue(createdFlywayConfig().isIgnoreMissingMigrations());
assertTrue(ValidatePatternUtils.isMissingIgnored(createdFlywayConfig().getIgnoreMigrationPatterns()));
}

@Test
@DisplayName("ignoreFutureMigrations is correctly set")
void testIgnoreFutureMigrations() {
runtimeConfig.ignoreFutureMigrations = false;
creator = new FlywayCreator(runtimeConfig, buildConfig);
assertFalse(createdFlywayConfig().isIgnoreFutureMigrations());
assertFalse(ValidatePatternUtils.isFutureIgnored(createdFlywayConfig().getIgnoreMigrationPatterns()));

runtimeConfig.ignoreFutureMigrations = true;
creator = new FlywayCreator(runtimeConfig, buildConfig);
assertTrue(createdFlywayConfig().isIgnoreFutureMigrations());
assertTrue(ValidatePatternUtils.isFutureIgnored(createdFlywayConfig().getIgnoreMigrationPatterns()));
}

@Test
Expand Down

0 comments on commit b0bb48e

Please sign in to comment.