Table of Contents

Interface IMigrationRunner

Namespace
eQuantic.Core.Data.Migration
Assembly
eQuantic.Core.Data.dll

Discovers the Migration types marked with MigrationAttribute, orders them by their timestamp, skips the ones already recorded in the IMigrationHistory, applies the rest in order (recording each as it succeeds) and reports how many ran.

public interface IMigrationRunner

Methods

RunAsync(CancellationToken)

Applies every pending migration in timestamp order. Safe to call on every startup — already-applied migrations are skipped.

Task<int> RunAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

Task<int>

The number of migrations applied by this call.