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

Extension versions should be domain-independent

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Contributed Code

      Description

      Extensions may choose to define upgrade steps in their upgrader classes which make changes to the database. The steps are represented as upgrade_N steps, where N is an incrementing integer.

      When these steps are run, CiviCRM stores the N value to be sure that the upgrade step isn't run twice, as this may cause database errors or other abnormalities. The N value is stored in the civicrm_settings table under the name org.example.myextension:version.

      The problem occurs when running a CiviCRM multisite. CiviCRM stores the setting as domain-specific, so it is possible to have org.example.myextension at version 1101 in Site A and 1103 in Site B. When this is the case, users on Site A will be advised to run the extension upgrades though they have already been run by Site B.

      Since a CiviCRM multisite by definition is comprised of a shared code base and a shared database, there should never be a need to run the updates on both Sites A and B. Therefore, I propose that version be tracked in the civicrm_extension table, where a column schema_version already exists for this purpose.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timotten Tim Otten
                Reporter:
                pittstains Frank J. Gómez
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d