MigrationHistory
The table recording what has run, and the only place this module writes anything of its own.
Functions
Link copied to clipboard
Creates the table if it is not there, and brings an older one up to date.
Link copied to clipboard
fun complete(session: OctaviusSessionOperations, id: Long, state: MigrationState, executionTimeMs: Long, failedStatement: Int? = null)
Closes off a row record opened as MigrationState.RUNNING.
Link copied to clipboard
Whether this database has a history table at all - asked before bootstrap, to recognise a fresh one.
Link copied to clipboard
Every row, oldest first.
Link copied to clipboard
fun record(session: OctaviusSessionOperations, migration: DiscoveredMigration, state: MigrationState, executionTimeMs: Long, checksum: Long? = migration.checksum): Long
Files a migration under the state it reached, and answers with the row's id.
Link copied to clipboard
Writes the marker saying this database was adopted at version, everything below it taken as run.