Table of Contents

Interface IDatabaseSchemaInspector

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

Reports which migrations the running build expects that the database does not carry yet.

public interface IDatabaseSchemaInspector

Remarks

The port reads and never writes. Applying a migration is a deliberate, reviewable deployment step run through the orchestration's migration resource, so nothing behind this interface may create, alter, or drop a schema object. A port that could do both would put the decision in the adapter rather than at the boundary that owns it.

It exists so the composition root can refuse to start against a schema the build does not recognize without taking on EF Core itself: whether a pending migration is fatal is a host decision, and reading the migration history is a persistence one.

Methods

ReadPendingMigrationIdentifiersAsync(CancellationToken)

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

ReadSearchVectorTextSearchConfigurationAsync(CancellationToken)

Reads the text search configuration the database compiled into the search vector's generated column.