final class MigrationRunner (View source)

Orchestrates pending migrations over the registry, state history, and schema API.

State is recorded only after a migration completes successfully. The runner does not wrap schema migrations in an automatic database transaction.

Methods

array

Runs pending migrations in deterministic identifier order.

array
status()

Builds the database-backed Applied/Pending status of registered migrations.

Details

__construct

__construct(MigrationRegistry $registry, MigrationStateRepository $state, Schema $schema)

No description

Parameters

MigrationRegistry $registry
MigrationStateRepository $state
Schema $schema

migrate

array migrate()

Runs pending migrations in deterministic identifier order.

Returns only migrations executed by this invocation. Execution stops when a migration fails, so subsequent migrations are not started.

Return Value

array

status

Builds the database-backed Applied/Pending status of registered migrations.

Orphaned identifiers are applied migrations that are no longer registered.

Return Value

MigrationStatus