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

Upgrade error if relationship type already exists

    Details

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

      Description

      The upgrade from 4.2.7 to 4.3 alpha2 fails if the relationship type "Partner of" already exists.

      To fix the issue, I edited the file "CRM/Upgrade/Incremental/sql/4.3.alpha2.mysql.tpl"

      The failing line:
      INSERT INTO `civicrm_relationship_type` ( name_a_b,label_a_b, name_b_a,label_b_a, description, contact_type_a, contact_type_b, is_reserved )
      VALUES
      ( 'Partner of', '

      {ts escape="sql"}Partner of{/ts}', 'Partner of', '{ts escape="sql"}

      Partner of

      {/ts}', '{ts escape="sql"}Partner relationship.{/ts}

      ', 'Individual', 'Individual', 0 );

      was changed to:
      INSERT IGNORE INTO `civicrm_relationship_type` ( name_a_b,label_a_b, name_b_a,label_b_a, description, contact_type_a, contact_type_b, is_reserved )
      VALUES
      ( 'Partner of', '

      {ts escape="sql"}Partner of{/ts}', 'Partner of', '{ts escape="sql"}

      Partner of

      {/ts}', '{ts escape="sql"}Partner relationship.{/ts}

      ', 'Individual', 'Individual', 0 );

        Attachments

          Activity

            People

            • Assignee:
              deepak Deepak Srivastava
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: