Skip to content

Commit

Permalink
Make Hibernate / Micrometer integration run after schema creation
Browse files Browse the repository at this point in the history
This is done to ensure that the use of Metrics does not force the
creation of EntityManagerFactory before extensions like
Liquibase or Flyway have had the chance to update the database
schema.

Fixes: quarkusio#39145
  • Loading branch information
geoand committed Mar 12, 2024
1 parent 9d46911 commit e6d1cd2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.List;
import java.util.Optional;

import io.quarkus.agroal.spi.JdbcDataSourceSchemaReadyBuildItem;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.BuildSteps;
Expand All @@ -28,6 +29,7 @@ public final class HibernateOrmMetricsProcessor {
public void metrics(HibernateOrmConfig config,
HibernateMetricsRecorder metricsRecorder,
List<PersistenceProviderSetUpBuildItem> persistenceUnitsStarted,
List<JdbcDataSourceSchemaReadyBuildItem> jdbcDataSourceSchemaReadyBuildItems,
Optional<MetricsCapabilityBuildItem> metricsConfiguration,
BuildProducer<MetricsFactoryConsumerBuildItem> datasourceMetrics) {

Expand Down

0 comments on commit e6d1cd2

Please sign in to comment.