Search in sources :

Example 1 with FlywayReport

use of org.springframework.boot.actuate.endpoint.FlywayEndpoint.FlywayReport in project spring-boot by spring-projects.

the class FlywayEndpoint method invoke.

@Override
public List<FlywayReport> invoke() {
    List<FlywayReport> reports = new ArrayList<>();
    for (Map.Entry<String, Flyway> entry : this.flyways.entrySet()) {
        List<FlywayMigration> migrations = new ArrayList<>();
        for (MigrationInfo info : entry.getValue().info().all()) {
            migrations.add(new FlywayMigration(info));
        }
        reports.add(new FlywayReport(entry.getKey(), migrations));
    }
    return reports;
}
Also used : Flyway(org.flywaydb.core.Flyway) MigrationInfo(org.flywaydb.core.api.MigrationInfo) ArrayList(java.util.ArrayList) FlywayReport(org.springframework.boot.actuate.endpoint.FlywayEndpoint.FlywayReport) Map(java.util.Map)

Aggregations

ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 Flyway (org.flywaydb.core.Flyway)1 MigrationInfo (org.flywaydb.core.api.MigrationInfo)1 FlywayReport (org.springframework.boot.actuate.endpoint.FlywayEndpoint.FlywayReport)1