DiscoveredMigration

internal sealed interface DiscoveredMigration

A migration the scan found, before anything about the database is known.

The two kinds carry different things, so they are separate types rather than one with nullable fields: a .sql file arrives with its text and checksum read, a class as a class that has not been constructed.

Inheritors

Types

Link copied to clipboard
class Code(val version: MigrationVersion?, val description: String, val script: String, val origin: String, val migrationClass: Class<*>) : DiscoveredMigration

A migration read off an OctaviusMigration class, which the scan has not constructed.

Link copied to clipboard
class Sql(val version: MigrationVersion?, val description: String, val script: String, val origin: String, val checksum: Long, val transactional: Boolean, val content: String) : DiscoveredMigration

A migration read out of a .sql file.

Properties

Link copied to clipboard
abstract val checksum: Long?

The number that decides whether this changed since it ran, or null for "do not check".

Link copied to clipboard
abstract val description: String

The words after __, as they will be recorded.

Link copied to clipboard

How a migration is named in a message: V2 add indexes, or R rebuild views for a repeatable one.

Link copied to clipboard
abstract val origin: String

Where this was found, for a log line and for the report.

Link copied to clipboard
abstract val script: String

What the history table files this under: a file's name, or a class's full name.

Link copied to clipboard
abstract val version: MigrationVersion?

The version, or null where the name marked this repeatable.