Class Migrate
Xmf\Database\Migrate
For a given module, compare the existing tables with a defined target schema and build a work queue of DDL/SQL to transform the existing tables to the target definitions.
Typically Migrate will be extended by a module specific class that will supply custom logic (see preSyncActions() method.)
Namespace: Xmf\Database
Package: Xmf
Category: Xmf\Database\Migrate
Copyright: 2016 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Database/Migrate.php
Package: Xmf
Category: Xmf\Database\Migrate
Copyright: 2016 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Database/Migrate.php
public
|
|
public
integer|false
|
|
public
array
|
|
public
array|boolean
|
|
public
boolean
|
#
synchronizeSchema( boolean $force = true )
Execute synchronization to transform current schema to target |
public
string[]
|
#
getSynchronizeDDL( )
Compare target and current schema, building work queue in $this->migrate to synchronized |
protected
|
|
protected
|
|
protected
|
#
synchronizeTable( string $tableName )
Build any DDL required to synchronize an existing table to match the target schema |
protected
boolean
|
#
targetHasColumn( string $tableName, string $columnName )
determine if a column on a table exists in the target definitions |
protected
boolean
|
|
public
string
|
|
public
integer
|
protected
false| |
$helper
|
|
protected
string[]
|
$moduleTables
table names used by module |
|
protected
|
$tableHandler
|
|
protected
string
|
$tableDefinitionFile
yaml definition file |
|
protected
array
|
$targetDefinitions
target table definitions in Xmf\Database\Tables::dumpTables() format |