Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Duplicate
-
Affects Version/s: 4.4.5
-
Fix Version/s: 4.4.6
-
Component/s: None
-
Labels:None
Description
So, I tried the upgrade & found that I got an error creating the URL - the reason seems to be that the index creation is in the loop - so if there are lots of urls to update the index bit gets called more than once
- note the below is trying to upgrade 15002 to 20001 - ie. it has already been around the loop in function https://github.com/civicrm/civicrm-core/blob/4.4/CRM/Upgrade/Incremental/php/FourFour.php#L320 & is trying again.
Index addition could be moved to sql file. Also this query https://github.com/civicrm/civicrm-core/blob/4.4/CRM/Upgrade/Incremental/php/FourFour.php#L324 could have a conditional index_url IS NOT NULL
[Error: Upgrade image_urls (15002 => 20001)]
Error Field Error Value
Type DB_Error
Code -5
Message DB Error: already exists
Mode 16
UserInfo CREATE INDEX index_image_url ON civicrm_contact (image_url); [nativecode=1061 ** Duplicate key name 'index_image_url']
DebugInfo CREATE INDEX index_image_url ON civicrm_contact (image_url); [nativecode=1061 ** Duplicate key name 'index_image_url']