Upgrade to Flyway 9.0.1
See gh-31723
This commit is contained in:
committed by
Andy Wilkinson
parent
785588826e
commit
f1bf80f5e1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 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.
|
||||
@@ -27,7 +27,6 @@ import java.util.stream.Stream;
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.flywaydb.core.api.MigrationInfo;
|
||||
import org.flywaydb.core.api.MigrationState;
|
||||
import org.flywaydb.core.api.MigrationType;
|
||||
|
||||
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
|
||||
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
|
||||
@@ -136,7 +135,7 @@ public class FlywayEndpoint {
|
||||
*/
|
||||
public static final class FlywayMigration {
|
||||
|
||||
private final MigrationType type;
|
||||
private final String type;
|
||||
|
||||
private final Integer checksum;
|
||||
|
||||
@@ -157,7 +156,7 @@ public class FlywayEndpoint {
|
||||
private final Integer executionTime;
|
||||
|
||||
private FlywayMigration(MigrationInfo info) {
|
||||
this.type = info.getType();
|
||||
this.type = info.getType().name();
|
||||
this.checksum = info.getChecksum();
|
||||
this.version = nullSafeToString(info.getVersion());
|
||||
this.description = info.getDescription();
|
||||
@@ -177,7 +176,7 @@ public class FlywayEndpoint {
|
||||
return (date != null) ? Instant.ofEpochMilli(date.getTime()) : null;
|
||||
}
|
||||
|
||||
public MigrationType getType() {
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 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.
|
||||
@@ -62,7 +62,7 @@ class FlywayEndpointTests {
|
||||
Map<String, FlywayDescriptor> flywayBeans = context.getBean(FlywayEndpoint.class).flywayBeans()
|
||||
.getContexts().get(context.getId()).getFlywayBeans();
|
||||
assertThat(flywayBeans).hasSize(1);
|
||||
assertThat(flywayBeans.values().iterator().next().getMigrations()).hasSize(3);
|
||||
assertThat(flywayBeans.values().iterator().next().getMigrations()).hasSize(4);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user