CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
Pages: [1] 2

Author Topic: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit  (Read 4344 times)

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
August 16, 2010, 12:19:23 pm
Hi all,

I am currently upgrading my site from 2.2.2 to 3.2 and am stuck with the error below and when I browse to the civicrm backend from now on I see "Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again."

I've tried this twice and got the same error.  Any advice would be much appreciated.

Thanks,

Tobias
Code: [Select]
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => ALTER TABLE civicrm_activity
ADD INDEX UI_source_record_id(source_record_id),
ADD INDEX UI_activity_type_id (activity_type_id),
ADD INDEX index_medium_id (medium_id),
ADD INDEX index_is_current_revision (is_current_revision),
ADD INDEX index_is_deleted (is_deleted) [nativecode=1061 ** Duplicate key name 'UI_activity_type_id']
    [type] => DB_Error
    [user_info] => ALTER TABLE civicrm_activity
ADD INDEX UI_source_record_id(source_record_id),
ADD INDEX UI_activity_type_id (activity_type_id),
ADD INDEX index_medium_id (medium_id),
ADD INDEX index_is_current_revision (is_current_revision),
ADD INDEX index_is_deleted (is_deleted) [nativecode=1061 ** Duplicate key name 'UI_activity_type_id']
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="ALTER TABLE civicrm_activity
ADD INDEX UI_source_record_id(source_record_id),
ADD INDEX UI_activity_type_id (activity_type_id),
ADD INDEX index_medium_id (medium_id),
ADD INDEX index_is_current_revision (is_current_revision),
ADD INDEX index_is_deleted (is_deleted) [nativecode=1061 ** Duplicate key name 'UI_activity_type_id']"]
)
[/code]
Kabissa - Space for Change in Africa http://kabissa.org

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
August 16, 2010, 12:27:35 pm
You are upgrading to 3.2.1 ?

There is a bug in the upgrade code. A patch will be published soon (and probably a new version of civicrm)

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
August 16, 2010, 12:51:47 pm
hi xavier - thanks for the tip. should I be upgrading to a different version? do you know when the new patch will be published?

thanks,

tobias
Kabissa - Space for Change in Africa http://kabissa.org

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
August 16, 2010, 01:22:53 pm
Hi,

Yes, you should. The patch is basically ready. An issue about what is the proper index.

I'd guess it will be published soon.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
August 16, 2010, 01:30:27 pm
thanks - now I've basically upgraded civicrm on my sandbox and the standard features all appear to be working. now to get the custom code up to speed....

-t
Kabissa - Space for Change in Africa http://kabissa.org

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 02, 2010, 08:28:04 pm
I'm hitting an error on the same entry but a different key:


 [debug_info] => ALTER TABLE civicrm_activity
ADD INDEX UI_source_record_id(source_record_id),
ADD INDEX index_medium_id (medium_id),
ADD INDEX index_is_current_revision (is_current_revision),

ADD INDEX index_is_deleted (is_deleted) [nativecode=1061 ** Duplicate key name 'index_medium_id']
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 03, 2010, 07:49:37 am
Hi Eileen - I stopped getting this error when upgrading to the most recent release.
Kabissa - Space for Change in Africa http://kabissa.org

TallDavid

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
    • ATO Zeta Mu Alumni
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.52
  • PHP version: 5.2.13
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 16, 2010, 01:26:56 pm
Same problem trying to upgrade CiviCRM from 3.2.0 to 3.2.3
Getting:
Quote
DB Error: already exists
Database Error Code: Duplicate key name 'index_medium_id', 1061

Note to self: tp.org

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 16, 2010, 02:48:26 pm
How odd - I don't have a long history with the site I was upgrading but it seemed OK.

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

TallDavid

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
    • ATO Zeta Mu Alumni
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.52
  • PHP version: 5.2.13
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 16, 2010, 03:09:39 pm
Eileen, do you recall what versions (from/to) you were upgrading when you got the error and which versions worked?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 16, 2010, 03:17:16 pm
No, I don't actually - it was a test version so I 'bullied it through' & then when I did it on live I dropped the indexes first
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

TallDavid

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
    • ATO Zeta Mu Alumni
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.52
  • PHP version: 5.2.13
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 16, 2010, 03:34:31 pm
Eileen, you gave me a thought.  Previously I had tried DROPing index_medium_id, but, would still get the same error.  After reading your post, I DROPped the indexes:
  • index_medium_id
  • index_is_current_revision
  • index_is_deleted
from TABLE civicrm_activity, re-ran the update and it completed without error.  Hope this helps the next person to encounter this error.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 16, 2010, 04:06:12 pm
Yeah - the other option is to comment those lines out of the upgrade file if your mysql / phpadmin access is limited. It's in the upgrade folder under incremental (off the top of my head). There should be a file per point version in there
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

ehowland

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6
  • MySQL version: various
  • PHP version: various
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 19, 2010, 05:41:57 pm
I am upgrading from version 3.1.5 to 3.2.3

First I got the duplicate index message.  I deleted the indexes as suggested by TallDavid

Then I got the cannot create table - already exists error for table civicrm_entity_financial_trxn.  

I then had to re-restore the database and both delete the indexes and drop the civicrm_entity_financial_trxn table.

Now I get  "DB Error: already exists" but there is no detail in the Error Details box so I am a bit at sea as for what to do next.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 19, 2010, 05:46:04 pm
I'm guessing the reason you had to re-restore is that the extra table was not deleted when you did your restore. If you have a good backup & you didn't last time I would drop the DB/ restore it & then drop the indexes & try again.

The error message IS a bit mysterious
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit

This forum was archived on 2017-11-26.