Package com.onec.migration
Class MigrationRunner
java.lang.Object
com.onec.migration.MigrationRunner
Executes
AppMigrations exactly once per database, in version order. Each
migration is claimed by inserting its version into onec_schema_history inside
the same transaction that runs the migration: a unique constraint arbitrates between
concurrently starting instances, and a failure rolls the claim back with the work.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpending(org.jdbi.v3.core.Jdbi jdbi, List<AppMigration> migrations) Migrations not yet recorded in the history table, in execution order.run(org.jdbi.v3.core.Jdbi jdbi, List<AppMigration> migrations) Runs all unapplied migrations; returns the versions executed by this call.
-
Constructor Details
-
MigrationRunner
-
-
Method Details
-
run
Runs all unapplied migrations; returns the versions executed by this call. -
pending
Migrations not yet recorded in the history table, in execution order.
-