CRM-5033 INSTALLATION: mysql "DROP FOREIGN KEY' Not Found issue when upgrading

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Installation 3 beta 3 (and most likely beta2 and beta1)

      when running civicrm/upgrade/index.php to upgrade a site, receive error: DB Error: Can't drop 'FK_civicrm_activity_source_contact_id'l check the key/column exists.

      Another user at the dev camp also had this issue.

      SUGGESTION:

      For all dropping of tables/keys, use mysql IF EXISTS which will not fire an error if the key/table/index is not there.
      The script should continue running in this case since most likely a previous script already deleted the constraint.

        Attachments

          Activity

          [CRM-5033] INSTALLATION: mysql "DROP FOREIGN KEY' Not Found issue when upgrading
          Kurund Jalmi added a comment -

          Might be related to changes done for : http://issues.civicrm.org/jira/browse/CRM-4935

          Deepak Srivastava added a comment -

          Don't think we can use "IF Exists" with constraint.
          php CRM_Core_DAO::checkFKConstraintInFormat() can work.

          Yashodha Chaku added a comment -

          assigning for 3.1 verification

          Rajan P Mayekar added a comment -

          Verified in r 25273.

            People

            • Assignee:
              Rajan P Mayekar
              Reporter:
              Sacha Stanton

              Dates

              • Created:
                Updated:
                Resolved: