class MigrationRepository (View source)

The MigrationRepository class is responsible for retrieving migrations, determing what the current migration version, etc.

Methods

__construct(Configuration $configuration, Connection $connection, MigrationFinder $migrationFinder, Factory $versionFactory)

No description

string[]
findMigrations(string $path)

No description

registerMigrationsFromDirectory(string $path)

No description

addVersion(Version $version)

No description

addVersions(array $versions)

No description

registerMigration(string $version, string $migrationClassName)

No description

registerMigrations(array $migrations)

No description

getCurrentVersion()

No description

getVersions()

No description

clearVersions()

No description

getVersion(string $version)

No description

hasVersion(string $version)

No description

hasVersionMigrated(Version $version)

No description

mixed[]|null
getVersionData(Version $version)

No description

getMigrations()

No description

string[]
getAvailableVersions()

No description

string[]
getNewVersions()

No description

string[]
getMigratedVersions()

No description

string[]
getLatestVersion()

No description

getRelativeVersion(string $version, int $delta)

No description

getDeltaVersion(string $delta)

No description

getPrevVersion()

No description

getNextVersion()

No description

Details

__construct(Configuration $configuration, Connection $connection, MigrationFinder $migrationFinder, Factory $versionFactory)

Parameters

Configuration $configuration
Connection $connection
MigrationFinder $migrationFinder
Factory $versionFactory

string[] findMigrations(string $path)

Parameters

string $path

Return Value

string[]

Version[] registerMigrationsFromDirectory(string $path)

Parameters

string $path

Return Value

Version[]

addVersion(Version $version)

Parameters

Version $version

addVersions(array $versions)

Parameters

array $versions

registerMigration(string $version, string $migrationClassName)

Parameters

string $version
string $migrationClassName

Exceptions

MigrationException

Version[] registerMigrations(array $migrations)

Parameters

array $migrations

Return Value

Version[]

getCurrentVersion()

Version[] getVersions()

Return Value

Version[]

clearVersions()

getVersion(string $version)

Parameters

string $version

hasVersion(string $version)

Parameters

string $version

hasVersionMigrated(Version $version)

Parameters

Version $version

mixed[]|null getVersionData(Version $version)

Parameters

Version $version

Return Value

mixed[]|null

Version[] getMigrations()

Return Value

Version[]

string[] getAvailableVersions()

Return Value

string[]

string[] getNewVersions()

Return Value

string[]

string[] getMigratedVersions()

Return Value

string[]

string[] getExecutedUnavailableMigrations()

Return Value

string[]

getNumberOfAvailableMigrations()

getLatestVersion()

getNumberOfExecutedMigrations()

getRelativeVersion(string $version, int $delta)

Parameters

string $version
int $delta

getDeltaVersion(string $delta)

Parameters

string $delta

getPrevVersion()

getNextVersion()