Class MigrationRecord

Assembly: redb.Export.dll

Represents a row from the _migrations table: one data migration applied to a scheme (redb Pro). The rows
tell a later migration run what the data already has, so an imported database does not get a migration twice.
Written after the structures; a database that never ran a migration writes none.

public sealed class MigrationRecord : ExportRecord

Inheritance

Object→ExportRecord→MigrationRecord

Properties

AffectedRows

Rows the migration changed.

public long? AffectedRows { get; init; }

AppliedAt

When the migration was applied.

public DateTimeOffset AppliedAt { get; init; }

AppliedBy

Who applied the migration.

public string? AppliedBy { get; init; }

DryRun

Whether the row records a dry run, which changed nothing.

public bool DryRun { get; init; }

DurationMs

How long the migration ran, in milliseconds.

public long? DurationMs { get; init; }

ExpressionHash

Hash of the migration's expression, used to detect a changed migration.

public string? ExpressionHash { get; init; }

Id

Primary key.

public long Id { get; init; }

MigrationId

Identifier of the migration within its scheme (e.g. "OrderProps_TotalPrice_v1").

public string MigrationId { get; init; }

MigrationType

Kind of migration (e.g. "ComputedFrom", "Transform").

public string MigrationType { get; init; }

PropertyName

Name of the property the migration changed.

public string? PropertyName { get; init; }

SchemeId

Scheme the migration was applied to.

public long SchemeId { get; init; }

SqlExecuted

The statement the migration ran, kept for audit.

public string? SqlExecuted { get; init; }

StructureId

Structure the migration changed; null for the whole scheme.

public long? StructureId { get; init; }