PHP Класс LazyRecord\Migration\MigrationRunner

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$connectionManager
$dataSourceIds
$logger

Открытые методы

Метод Описание
__construct ( CLIFramework\Logger $logger = null, $dsIds )
getDowngradeScripts ( Connection $conn, BaseDriver $driver )
getLastMigrationId ( Connection $conn, BaseDriver $driver )
getUpgradeScripts ( Connection $conn, BaseDriver $driver ) Each data source has it's own migration timestamp, we use the data source ID to get the migration timestamp and filter the migration script.
load ( $directory ) Load migration script from specific directory.
loadMigrationScripts ( )
resetMigrationId ( Connection $conn, BaseDriver $driver )
runDowngrade ( Connection $conn, BaseDriver $driver, array $scripts = null, $steps = 1 ) Run downgrade scripts.
runUpgrade ( Connection $conn, BaseDriver $driver, array $scripts = null ) Run upgrade scripts.
runUpgradeAutomatically ( Connection $conn, BaseDriver $driver, array $schemas, OptionResult $options = null )
updateLastMigrationId ( Connection $conn, BaseDriver $driver, $id )

Описание методов

__construct() публичный Метод

public __construct ( CLIFramework\Logger $logger = null, $dsIds )
$logger CLIFramework\Logger

getDowngradeScripts() публичный Метод

public getDowngradeScripts ( Connection $conn, BaseDriver $driver )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver

getLastMigrationId() публичный Метод

public getLastMigrationId ( Connection $conn, BaseDriver $driver )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver

getUpgradeScripts() публичный Метод

Each data source has it's own migration timestamp, we use the data source ID to get the migration timestamp and filter the migration script.
public getUpgradeScripts ( Connection $conn, BaseDriver $driver )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver

load() публичный Метод

Load migration script from specific directory.
public load ( $directory )

loadMigrationScripts() публичный Метод

resetMigrationId() публичный Метод

public resetMigrationId ( Connection $conn, BaseDriver $driver )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver

runDowngrade() публичный Метод

Run downgrade scripts.
public runDowngrade ( Connection $conn, BaseDriver $driver, array $scripts = null, $steps = 1 )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver
$scripts array

runUpgrade() публичный Метод

Run upgrade scripts.
public runUpgrade ( Connection $conn, BaseDriver $driver, array $scripts = null )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver
$scripts array

runUpgradeAutomatically() публичный Метод

public runUpgradeAutomatically ( Connection $conn, BaseDriver $driver, array $schemas, OptionResult $options = null )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver
$schemas array
$options GetOptionKit\OptionResult

updateLastMigrationId() публичный Метод

public updateLastMigrationId ( Connection $conn, BaseDriver $driver, $id )
$conn LazyRecord\Connection
$driver SQLBuilder\Driver\BaseDriver

Описание свойств

$connectionManager защищенное свойство

protected $connectionManager

$dataSourceIds защищенное свойство

protected $dataSourceIds

$logger защищенное свойство

protected $logger