Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.5, 4.7.7
    • Fix Version/s: 4.7.8
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      There are multiple reports of this bug in the wild:
      http://civicrm.stackexchange.com/questions/11318/unable-to-upgrade-to-4-7-6
      http://civicrm.stackexchange.com/questions/11522/upgrade-fails-4-7-4-4-7-6-in-wp-4-5-1

      I was asked to investigate another instance of this, and have determined that there are two root causes, which is why this has proved difficult to solve on Stack Exchange.

      First - the upgrade code in question (in CRM/Upgrade/Incremental/sql/4.7.5.mysql.tpl) attempts to drop existing FK constraints. Not everyone has those FK constraints. I couldn't find definitive evidence of why - the XML schema file in question doesn't have version numbers, and I don't have a Civi SVN archive. My guess is that when this table was added, the upgrade script didn't add foreign keys to existing sites.

      Second - the upgrade code in CRM-18345 adds foreign key constraints - but doesn't first disable foreign key checks. That means that it fails if you've already met the very condition it's attempting to prevent.

      To solve this definitively, the code should:

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                palantejon Jon K Goldberg
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 hour, 30 minutes
                  1h 30m