onSession

fun onSession(session: OctaviusSession, config: MigratorConfig = MigratorConfig()): OctaviusMigrator

A migrator running on a session you already hold, rather than one borrowed from a DataSource.

For tests, and for code that has a session open and wants the run on that one. The session must be in auto-commit: the run manages transactions itself, and nesting it inside one of yours would let a migration be recorded as applied while its work was still uncommitted.