Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-10477

Upgrades trample extension-module data

    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.

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: