Table of Contents

Method ReadPendingMigrationIdentifiersAsync

Namespace
MailFathom.Application.Persistence
Assembly
MailFathom.Application.dll

ReadPendingMigrationIdentifiersAsync(CancellationToken)

Reads the identifiers of the migrations the build defines and the database has not applied.

Task<IReadOnlyList<string>> ReadPendingMigrationIdentifiersAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<string>>

The pending migration identifiers, in the order they would be applied, or an empty sequence when the schema is current.

Remarks

An unreachable database, a missing history table, and an insufficiently privileged user are all unreadable rather than current. Reporting an empty sequence for any of them would let a host start against a database it never actually inspected.

Exceptions

DatabaseSchemaStateUnreadableException

Thrown when the migration history cannot be read at all, which leaves the schema of unknown shape rather than known to be current or known to be behind.