MigrationMetadata

zio.blocks.data.migration.MigrationMetadata

Helpers for the optional data_migrations metadata table.

Stores provenance for migrated aggregates when resume/re-processing or audit trails are required. Not required for simple in-place migrations.

Attributes

Source
MigrationMetadata.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def createTable(transactor: Transactor): Unit

Creates the data_migrations table if it does not exist.

Creates the data_migrations table if it does not exist.

Attributes

Source
MigrationMetadata.scala
def getVersion(aggregateType: String, aggregateId: String)(using con: DbCon): Option[DataVersion]

Returns the current data version for an aggregate, if recorded.

Returns the current data version for an aggregate, if recorded.

Attributes

Source
MigrationMetadata.scala
def markDone(aggregateType: String, aggregateId: String, version: DataVersion)(using con: DbCon): Unit

Marks an aggregate as successfully migrated to a given version.

Marks an aggregate as successfully migrated to a given version.

Attributes

Source
MigrationMetadata.scala
def migratedCount(aggregateType: String)(using con: DbCon): Long

Returns count of migrated aggregates recorded in the metadata table.

Returns count of migrated aggregates recorded in the metadata table.

Attributes

Source
MigrationMetadata.scala