MigrationStateRepository
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
Creates a ledger repository sharing the driver and schema connection used by migrations.
Creates the migrations state table when it does not already exist.
Returns identifiers stored in the persistent migration history.
Records an identifier after its migration has completed successfully.
Details
__construct
__construct(DatabaseDriverInterface $driver, Schema $schema)
Creates a ledger repository sharing the driver and schema connection used by migrations.
ensureTable
void
ensureTable()
Creates the migrations state table when it does not already exist.
applied
array
applied()
Returns identifiers stored in the persistent migration history.
record
void
record(string $identifier)
Records an identifier after its migration has completed successfully.