Apply database data updates whenever needed
static
void
applyAllDataUpdates
()
Apply database updates whenever needed
static
boolean
applyAllUpdates
()
Mage_Core_Model_Resource_Setup
__construct
( $resourceName)
***************** CONFIG ****************
void
addConfigField
( $path, $label, [ $data = array()], [ $default = null])
-
$path
-
$label
-
array
$data
-
$default
Run each time after applying of all updates, if setup model setted $_callAfterApplyAllUpdates flag to true
Apply data updates to the system after upgrading.
Apply module resource install, upgrade and data scripts
void
applyUpdates
()
Redefined in descendants as:
Delete config field values
-
string
$path
-
string
$scope: (default|stores|websites|config)
Delete table row
Mage_Core_Model_Resource_Setup
deleteTableRow
(
string $table,
string $idField,
string|int $id, [
null|string $parentField =
null], [
int|string $parentId =
0])
-
string
$table
-
string
$idField
-
string|int
$id
-
null|string
$parentField
-
int|string
$parentId
Check call afterApplyAllUpdates method for setup class
boolean
getCallAfterApplyAllUpdates
()
Get connection object
Varien_Db_Adapter_Pdo_Mysql
getConnection
()
Get table name by table placeholder
string
getTable
(string $tableName)
Retrieve row or field from table by id or string and parent id
mixed|boolean
getTableRow
(string $table, string $idField, string|integer $id, [string $field = null], [string $parentField = null], [string|integer $parentId = 0])
-
string
$table
-
string
$idField
-
string|integer
$id
-
string
$field
-
string
$parentField
-
string|integer
$parentId
void
setConfigData
( $path, $value, [ $scope = 'default'], [ $scopeId = 0], [ $inherit = 0])
-
$path
-
$value
-
$scope
-
$scopeId
-
$inherit
Add table placeholder/table name relation
-
string
$tableName
-
string
$realTableName
void
tableExists
( $table)
void
updateTable
( $table, $conditionExpr, $valueExpr)
-
$table
-
$conditionExpr
-
$valueExpr
Update one or more fields of table row
Mage_Eav_Model_Entity_Setup
updateTableRow
(
string $table,
string $idField,
string|integer $id,
string|array $field, [
mixed|null $value =
null], [
string $parentField =
null], [
string|integer $parentId =
0])
-
string
$table
-
string
$idField
-
string|integer
$id
-
string|array
$field
-
mixed|null
$value
-
string
$parentField
-
string|integer
$parentId
Get sql files for modifications
array
_getModifySqlFiles
($actionType $actionType, $fromVersion, $toVersion, $arrFiles)
-
$actionType
$actionType
-
$fromVersion
-
$toVersion
-
$arrFiles
Get core resource resource model
Run data install scripts
void
_installData
(string $newVersion)
Run resource installation file
boolean
_installResourceDb
( $newVersion, string $version)
-
string
$version
-
$newVersion
Run module modification files. Return version of last applied upgrade (false if no upgrades applied)
string
_modifyResourceDb
(string $actionType, string $fromVersion, string $toVersion)
-
string
$actionType: install|upgrade|uninstall
-
string
$fromVersion
-
string
$toVersion
Roll back resource
bool
_rollbackResourceDb
(string $newVersion, $oldVersion)
-
string
$newVersion
-
$oldVersion
Uninstall resource
bool
_uninstallResourceDb
($version $version)
-
$version
$version: existing resource version
Run data upgrade scripts
void
_upgradeData
(string $oldVersion, string $newVersion)
-
string
$oldVersion
-
string
$newVersion
Run resource upgrade files from $oldVersion to $newVersion
void
_upgradeResourceDb
(string $oldVersion, string $newVersion)
-
string
$oldVersion
-
string
$newVersion