Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.1.0
-
Fix Version/s: 4.2.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
When upgrading an extension, CRM_Core_Extensions::upgrade() performs an "uninstall" followed by an "install". This is reasonable for reports and payments processors (which don't generally create new data structures); however, for modules which must manage their own tables, this invokes hook_civicrm_uninstall and hook_civicrm_install which will cause 'DROP TABLE' and 'CREATE TABLE' – thereby destroying any data.
The upgrade process should instead call a new hook, hook_civicrm_upgrade.