Class HitlSchemaManager

java.lang.Object
dev.agenor.adapters.persistence.hitl.HitlSchemaManager

public final class HitlSchemaManager extends Object
Runs Flyway migrations for the HITL approval queue schema on startup.

History is kept in agenor_hitl_schema_history, so the queue can share a database with the agent directory and with an application's own schema; see SchemaMigrations.

Since:
0.23.0
  • Constructor Details

    • HitlSchemaManager

      public HitlSchemaManager(DataSource dataSource, String migrationLocation)
      Creates a schema manager that will run Flyway migrations from the given location.
      Parameters:
      dataSource - the JDBC data source; must not be null
      migrationLocation - Flyway location, e.g. classpath:db/agenor/hitl
  • Method Details

    • migrate

      public void migrate()
      Applies all pending Flyway migrations. Safe to call on every startup, on a database of its own or shared with the directory and an application's schema.