PHP Class LazyRecord\Migration\MigrationRunner

Exibir arquivo Open project: corneltek/lazyrecord Class Usage Examples

Protected Properties

Property Type Description
$connectionManager
$dataSourceIds
$logger

Public Methods

Method Description
__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 )

Method Details

__construct() public method

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

getDowngradeScripts() public method

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

getLastMigrationId() public method

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

getUpgradeScripts() public method

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() public method

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

loadMigrationScripts() public method

resetMigrationId() public method

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

runDowngrade() public method

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

runUpgrade() public method

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

runUpgradeAutomatically() public method

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 method

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

Property Details

$connectionManager protected_oe property

protected $connectionManager

$dataSourceIds protected_oe property

protected $dataSourceIds

$logger protected_oe property

protected $logger