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

Upgrade should detect and throw error early on recommending schema correction if already broken

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: None
    • Labels:
      None

      Description

      Fo example if 'show create table civicrm_event' output contains

      KEY `FK_civicrm_event_payment_processor_id` ..

      and not

      CONSTRAINT `FK_civicrm_event_payment_processor_id` ..

      is an indication that schema needs to rebuilding & we should point to http://wiki.civicrm.org/confluence/display/CRMDOC42/Ensuring+Schema+Integrity+on+Upgrades and not allow upgrade to proceed.

      Above is just an example. We should do some checks with civicrm_contact table.

      CRM_Core_DAO::checkConstraintExists() is an example of how this could be done.

      Few related forum posts:
      http://forum.civicrm.org/index.php/topic,25790.0.html
      http://forum.civicrm.org/index.php/topic,25725.msg109040.html#msg109040

        Attachments

          Activity

            People

            • Assignee:
              pratik.joshi Pratik Joshi
              Reporter:
              deepak Deepak Srivastava
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: