final class MigrationStateRepository (View source)

Manages the persistent history of applied migrations.

The repository uses the same DatabaseDriverInterface instance as Schema so state reads and writes target the active schema connection.

Constants

private TABLE

Methods

void

Creates the migrations state table when it does not already exist.

void
array

Returns identifiers stored in the persistent migration history.

array
void
record(string $identifier)

Records an identifier after its migration has completed successfully.

void

Details

__construct

__construct(DatabaseDriverInterface $driver, Schema $schema)

No description

Parameters

DatabaseDriverInterface $driver
Schema $schema

ensureTable

void ensureTable()

Creates the migrations state table when it does not already exist.

Return Value

void

applied

array applied()

Returns identifiers stored in the persistent migration history.

Return Value

array

record

void record(string $identifier)

Records an identifier after its migration has completed successfully.

Parameters

string $identifier

Return Value

void