PHP Class LazyRecord\Migration\MigrationRunner

Afficher le fichier Open project: corneltek/lazyrecord Class Usage Examples

Protected Properties

Свойство Type Description
$connectionManager
$dataSourceIds
$logger

Méthodes publiques

Méthode 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 méthode

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

getDowngradeScripts() public méthode

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

getLastMigrationId() public méthode

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

getUpgradeScripts() public méthode

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 méthode

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

loadMigrationScripts() public méthode

resetMigrationId() public méthode

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

runDowngrade() public méthode

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 méthode

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

runUpgradeAutomatically() public méthode

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 méthode

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