Eileen – yes, I have added a conditional and have already sent an email to Tim warning him that the original 4.4 patch will error out during upgrades as it the index is created in the task. Will forward the email.
 
--Nicolas.
 
From: Eileen McNaughton [mailto:notifications@github.com] 
Sent: Friday, May 9, 2014 1:31 AM
To: civicrm/civicrm-core
Cc: nganivet
Subject: Re: [civicrm-core] CRM-14499 - Image URL fixup (#3058)
 
In CRM/Upgrade/Incremental/php/FourFour.php:
> @@ -304,6 +307,60 @@ function upgrade_4_4_4($rev) {>      return TRUE;>    }>  > +  function upgrade_4_4_6($rev){> +    $minId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(min(id),0) FROM civicrm_contact');> +    $maxId = CRM_Core_DAO::singleValueQuery('SELECT coalesce(max(id),0) FROM civicrm_contact');> +    for ($startId = $minId; $startId <= $maxId; $startId += self::BATCH_SIZE) {> +      $endId = $startId + self::BATCH_SIZE - 1;> +      $title = ts('Upgrade image_urls (%1 => %2)', array(1 => $startId, 2 => $endId));> +      $this->addTask($title, 'upgradeImageUrls', $startId, $endId);> +    }> +  }> +> +  static function upgradeImageUrls(CRM_Queue_TaskContext $ctx, $startId, $endId){> +    $sql = "CREATE INDEX index_image_url ON civicrm_contact (image_url);";sorry - getting confused - conditional is in the 4.2 script
https://github.com/CiviCRM42/civicrm42-core/blob/4.2/CRM/Upgrade/Incremental/php/FourTwo.php#L339
NB - the way this index is added should be our std way of adding indexes (check first then add) IMHO. If that method is used in 4.4 we don't need to remove it from 4.2 script
—
Reply to this email directly or view it on GitHub.