Class Mage_Core_Model_Resource_Setup
Resource Setup Model
Direct known subclasses
Mage_Api2_Model_Resource_Setup, Mage_CatalogIndex_Model_Resource_Setup, Mage_Eav_Model_Entity_Setup, Mage_ImportExport_Model_Resource_Setup, Mage_Index_Model_Resource_Setup, Mage_Oauth_Model_Resource_Setup, Mage_Sendfriend_Model_Resource_SetupIndirect known subclasses
Mage_Catalog_Model_Resource_Eav_Mysql4_Setup, Mage_Catalog_Model_Resource_Setup, Mage_GoogleCheckout_Model_Resource_Setup, Mage_ImportExport_Model_Mysql4_Setup, Mage_Index_Model_Mysql4_Setup, Mage_Paypal_Model_Mysql4_Setup, Mage_Paypal_Model_Resource_Setup, Mage_Sales_Model_Entity_Setup, Mage_Sales_Model_Mysql4_Setup, Mage_Sales_Model_Resource_Setup, Mage_Sendfriend_Model_Mysql4_Setup, Mage_Tax_Model_Mysql4_Setup, Mage_CatalogIndex_Model_Mysql4_Setup, Mage_Tax_Model_Resource_Setup, Mage_Weee_Model_Mysql4_Setup, Mage_Weee_Model_Resource_Setup, Mage_XmlConnect_Model_Mysql4_Setup, Mage_XmlConnect_Model_Resource_Setup, Mage_Checkout_Model_Mysql4_Setup, Mage_Checkout_Model_Resource_Setup, Mage_Customer_Model_Entity_Setup, Mage_Customer_Model_Resource_Setup, Mage_GiftMessage_Model_Mysql4_Setup, Mage_GiftMessage_Model_Resource_Setup, Mage_GoogleCheckout_Model_Mysql4_SetupCategory: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Core/Model/Resource/Setup.php
public
|
|
public
Varien_Db_Adapter_Interface
|
|
public
|
|
public
string
|
|
protected
string
|
|
protected
|
|
public static
boolean
|
|
public static
|
|
public
|
|
public
|
|
protected
|
#
_hookQueries( )
Hooks queries to strengthen backwards compatibility in MySQL. Currently - dynamically updates column types for foreign keys, when their targets were changed during MMDB development. |
protected
|
|
public
|
#
callbackQueryHook( string & $sql, array & $bind )
Callback function, called on every query adapter processes. Modifies SQL or tables, so that foreign keys will be set successfully |
protected
|
|
protected
|
|
protected
|
|
protected
|
#
_upgradeResourceDb( string $oldVersion, string $newVersion )
Run resource upgrade files from $oldVersion to $newVersion |
protected
|
|
protected
|
|
protected
array
|
#
_getAvailableDbFiles( string $actionType, string $fromVersion, string $toVersion )
Retrieve available Database install/upgrade files for current module |
protected
array
|
#
_getAvailableDataFiles( string $actionType, string $fromVersion, string $toVersion )
Retrieve available Data install/upgrade files for current module |
protected
|
|
protected
string|false
|
#
_modifyResourceDb( string $actionType, string $fromVersion, string $toVersion )
Run module modification files. Return version of last applied upgrade (false if no upgrades applied) |
protected
array
|
#
_getModifySqlFiles( string $actionType, string $fromVersion, string $toVersion, array $arrFiles )
Get data files for modifications |
public
mixed|boolean
|
#
getTableRow( string $table, string $idField, string|integer $id, string $field = null, string $parentField = null, string|integer $parentId = 0 )
Retrieve row or field from table by id or string and parent id |
public
|
#
deleteTableRow( string $table, string $idField, string|integer $id, null|string $parentField = null, integer|string $parentId = 0 )
Delete table row |
public
|
#
updateTableRow( string $table, string $idField, string|integer $id, string|array $field, mixed|null $value = null, string $parentField = null, string|integer $parentId = 0 )
Update one or more fields of table row |
public
boolean
|
|
public
|
#
setConfigData( string $path, string $value, integer|string $scope = 'default', integer $scopeId = 0, integer $inherit = 0 )
Save configuration data |
public
|
|
public
|
|
public
|
|
public
|
|
public
string
|
#
getIdxName( string $tableName, array|string $fields, string $indexType = '' )
Retrieve 32bit UNIQUE HASH for a Table index |
public
string
|
|
public
boolean
|
|
public
|
#
afterApplyAllUpdates( )
Run each time after applying of all updates, if setup model setted $_callAfterApplyAllUpdates flag to true |
string |
DEFAULT_SETUP_CONNECTION
|
'core_setup' |
|
integer |
VERSION_COMPARE_EQUAL
|
0 |
|
integer |
VERSION_COMPARE_LOWER
|
-1 |
|
integer |
VERSION_COMPARE_GREATER
|
1 |
|
string |
TYPE_DB_INSTALL
|
'install' |
|
string |
TYPE_DB_UPGRADE
|
'upgrade' |
|
string |
TYPE_DB_ROLLBACK
|
'rollback' |
|
string |
TYPE_DB_UNINSTALL
|
'uninstall' |
|
string |
TYPE_DATA_INSTALL
|
'data-install' |
|
string |
TYPE_DATA_UPGRADE
|
'data-upgrade' |
protected
string
|
$_resourceName |
|
#
Setup resource name |
protected
Varien_Simplexml_Object
|
$_resourceConfig |
|
#
Setup resource configuration object |
protected
Varien_Simplexml_Object
|
$_connectionConfig |
|
#
Connection configuration object |
protected
Varien_Simplexml_Object
|
$_moduleConfig |
|
#
Setup module configuration object |
protected
boolean
|
$_callAfterApplyAllUpdates | false |
#
Call afterApplyAllUpdates method flag |
protected
Varien_Db_Adapter_Pdo_Mysql
|
$_conn |
|
#
Setup Connection |
protected
array
|
$_tables | array() |
#
Tables cache array |
protected
array
|
$_setupCache | array() |
#
Tables data cache array |
protected
boolean
|
$_queriesHooked | false |
#
Flag which shows, that setup has hooked queries from DB adapter |
protected static
boolean
|
$_hadUpdates |
|
#
Flag which allow to detect that some schema update was applied dueting request |
protected static
boolean
|
$_schemaUpdatesChecked |
|
#
Flag which allow run data install or upgrade |