Skip to content
docsv0.13.1

MigrationLedgerInterface

The migration tracking store: which versions already ran per plugin. Read semantics: executedVersions()/executedMigrations() MUST NOT throw when the backing store is unavailable — they return [] (matching the host's historical behavior).

MigrationLedgerInterface::ensureStorage()

abstract public function ensureStorage(): void

Make sure the ledger storage exists (create it when missing).

MigrationLedgerInterface::recordExecuted()

abstract public function recordExecuted(string $pluginName, string $version, ?string $description, DateTimeImmutable $executedAt): void

Record one executed migration.

Parameters

Parameters of recordExecuted()
NameTypeDescription
$pluginNamestring
$versionstring
$description?string
$executedAtDateTimeImmutable

MigrationLedgerInterface::removeExecuted()

abstract public function removeExecuted(string $pluginName, string $version): void

Remove one executed record (rollback bookkeeping). Unknown pair: no-op.

Parameters

Parameters of removeExecuted()
NameTypeDescription
$pluginNamestring
$versionstring

MigrationLedgerInterface::executedVersions()

abstract public function executedVersions(string $pluginName): array

Versions already executed for a plugin, ordered by execution time ascending.

Parameters

Parameters of executedVersions()
NameTypeDescription
$pluginNamestring

MigrationLedgerInterface::executedMigrations()

abstract public function executedMigrations(string $pluginName): array

Full ledger rows for a plugin, ordered by execution time ascending.

Parameters

Parameters of executedMigrations()
NameTypeDescription
$pluginNamestring