Class MigrationRunner

java.lang.Object
com.iantapply.orchestra.adapter.postgres.MigrationRunner

public final class MigrationRunner extends Object
Applies the bundled, idempotent Orchestra PostgreSQL schema migration.
  • Constructor Details

    • MigrationRunner

      public MigrationRunner(DataSource dataSource)
      Creates a migration runner.
      Parameters:
      dataSource - database receiving the schema migration
  • Method Details

    • migrate

      public void migrate() throws SQLException, IOException
      Applies all bundled schema statements in one transaction.
      Throws:
      SQLException - when PostgreSQL rejects the migration
      IOException - when the bundled migration cannot be read