Class RedbTypeMigrationException

Assembly: redb.Core.dll

Thrown by scheme synchronisation when a property's type changed but the stored values could not be
moved to the column the new type reads from.

Why this stops synchronisation instead of warning. The two failure modes are both silent if
allowed through. Updating _structures._id_type without moving the values leaves every row
reading as null — and with the default PropsSaveStrategy.DeleteInsert
the stranded values are physically deleted the next time the object is saved. Leaving the type alone
instead makes the CLR class and the structure disagree, which surfaces later and further from the
cause. Failing here is the only outcome that keeps the data intact and the state describable.


The type is deliberately distinct rather than a plain InvalidOperationException: the caller has
to be able to tell "values are waiting for a manual migration" from any other start-up failure, and
tell it from the exception type rather than by matching on message text.

public class RedbTypeMigrationException : Exception, ISerializable

Inheritance

Object→Exception→RedbTypeMigrationException

Implements

Properties

AffectedRows

Rows holding a value under the old type, as reported by the migration.

public int AffectedRows { get; }

MigratedRows

Rows the migration did move. Zero when it never ran.

public int MigratedRows { get; }

MigrationErrors

Verbatim diagnostics from the provider's migration, when it produced any.

public string? MigrationErrors { get; }

NewTypeName

REDB type name the property now maps to.

public string NewTypeName { get; }

OldTypeName

REDB type name the structure had.

public string OldTypeName { get; }

PropertyName

Name of the property backing that structure.

public string PropertyName { get; }

SchemeId

Scheme the structure belongs to.

public long SchemeId { get; }

SchemeName

Scheme name, when it could be resolved; the id is always present.

public string? SchemeName { get; }

StrandedRows

Rows left behind: they still hold their original value.

public int StrandedRows { get; }

StructureId

Structure whose values could not be migrated.

public long StructureId { get; }

Constructors