Method | Description | |
---|---|---|
__construct ( |
||
__toString ( ) | ||
addSql ( array | string $sql, array $params = [], array $types = [] ) | Add some SQL queries to this versions migration | |
execute ( string $direction, boolean $dryRun = false, boolean $timeAllQueries = false ) : array | Execute this migration version up or down and and return the SQL. | |
getConfiguration ( ) : |
Returns the Migrations Configuration object instance | |
getExecutionState ( ) | ||
getMigration ( ) : Doctrine\DBAL\Migrations\AbstractMigration | ||
getTime ( ) : integer | Returns the time this migration version took to execute | |
getVersion ( ) : string | Returns the string version in the format YYYYMMDDHHMMSS | |
isMigrated ( ) : boolean | Check if this version has been migrated or not. | |
markMigrated ( ) | ||
markNotMigrated ( ) | ||
writeSqlFile ( string $path, string $direction = self::DIRECTION_UP ) : boolean | Write a migration SQL file to the given path |
Method | Description | |
---|---|---|
addQueryParams ( mixed[] $params, string[] $types ) | ||
executeRegisteredSql ( $dryRun = false, $timeAllQueries = false ) | ||
formatParamsForOutput ( array $params, array $types ) : string | null | Formats a set of sql parameters for output with dry run. | |
markVersion ( $direction ) | ||
outputQueryTime ( $queryStart, $timeAllQueries = false ) | ||
outputSqlQuery ( integer $idx, string $query ) : void | Outputs a SQL query via the OutputWriter. |
public __construct ( |
||
$configuration | ||
$schemaProvider | Doctrine\DBAL\Migrations\Provider\SchemaDiffProviderInterface |
public execute ( string $direction, boolean $dryRun = false, boolean $timeAllQueries = false ) : array | ||
$direction | string | The direction to execute the migration. |
$dryRun | boolean | Whether to not actually execute the migration SQL and just do a dry run. |
$timeAllQueries | boolean | Measuring or not the execution time of each SQL query. |
return | array | $sql |
public getConfiguration ( ) : |
||
return | $configuration |
public getMigration ( ) : Doctrine\DBAL\Migrations\AbstractMigration | ||
return | Doctrine\DBAL\Migrations\AbstractMigration |
public getVersion ( ) : string | ||
return | string | $version |
public isMigrated ( ) : boolean | ||
return | boolean |