Skip to content

Commit

Permalink
Bring back erroneously removed Flyway Dev Console route handler
Browse files Browse the repository at this point in the history
This was erroneously removed in fa62e3f

Fixes: quarkusio#22407
  • Loading branch information
geoand committed Dec 20, 2021
1 parent cc118fd commit 9cd2148
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.flyway;

import static io.quarkus.deployment.annotations.ExecutionTime.RUNTIME_INIT;
import static java.util.List.of;

import java.nio.file.Files;
Expand All @@ -15,6 +16,7 @@
import io.quarkus.agroal.spi.JdbcInitialSQLGeneratorBuildItem;
import io.quarkus.deployment.IsDevelopment;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem;
import io.quarkus.dev.config.CurrentConfig;
import io.quarkus.dev.console.DevConsoleManager;
Expand All @@ -24,6 +26,7 @@
import io.quarkus.flyway.runtime.FlywayBuildTimeConfig;
import io.quarkus.flyway.runtime.FlywayContainersSupplier;
import io.quarkus.flyway.runtime.FlywayDataSourceBuildTimeConfig;
import io.quarkus.flyway.runtime.devconsole.FlywayDevConsoleRecorder;
import io.vertx.core.MultiMap;
import io.vertx.ext.web.RoutingContext;

Expand All @@ -36,6 +39,12 @@ public DevConsoleRuntimeTemplateInfoBuildItem collectBeanInfo(
curateOutcomeBuildItem);
}

@BuildStep
@Record(value = RUNTIME_INIT, optional = true)
DevConsoleRouteBuildItem invokeEndpoint(FlywayDevConsoleRecorder recorder) {
return new DevConsoleRouteBuildItem("datasources", "POST", recorder.handler());
}

@BuildStep
DevConsoleRouteBuildItem invokeEndpoint(List<JdbcInitialSQLGeneratorBuildItem> generatorBuildItem,
FlywayBuildTimeConfig buildTimeConfig,
Expand Down

0 comments on commit 9cd2148

Please sign in to comment.