class Version (View source)

The Version class represents a single migration version. It wraps around your migration class that extends the AbstractMigration class.

Methods

__construct(Configuration $configuration, string $version, string $class, ExecutorInterface $versionExecutor)

No description

__toString()

No description

getVersion()

No description

getDateTime()

No description

getConfiguration()

No description

getMigration()

No description

isMigrated()

No description

getExecutedAt()

No description

setState(int $state)

No description

getExecutionState()

No description

addSql(string $sql, array $params = [], array $types = [])

No description

writeSqlFile(string $path, string $direction = Direction::UP)

No description

execute(string $direction, MigratorConfiguration|null $migratorConfiguration = null)

No description

markMigrated()

No description

markNotMigrated()

No description

markVersion(string $direction)

No description

Details

__construct(Configuration $configuration, string $version, string $class, ExecutorInterface $versionExecutor)

Parameters

Configuration $configuration
string $version
string $class
ExecutorInterface $versionExecutor

__toString()

getVersion()

getDateTime()

getConfiguration()

getMigration()

isMigrated()

getExecutedAt()

setState(int $state)

Parameters

int $state

getExecutionState()

addSql(string $sql, array $params = [], array $types = [])

Parameters

string $sql
array $params
array $types

writeSqlFile(string $path, string $direction = Direction::UP)

Parameters

string $path
string $direction

execute(string $direction, MigratorConfiguration|null $migratorConfiguration = null)

Parameters

string $direction
MigratorConfiguration|null $migratorConfiguration

markMigrated()

markNotMigrated()

markVersion(string $direction)

Parameters

string $direction