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 4342 times)

wordsetc

  • I’m new here
  • *
  • Posts: 16
  • Karma: 1
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 23, 2010, 06:10:56 am
I had sort of the same thing happen upgrading to 3.2.3. I can't remember what version I had before, but it was 3. something. I got this error on upgrade:

Sorry. A non-recoverable error has occurred.
DB Error: no such field

I'm not very good at back-end stuff, I'd sure like some more step-by-step ideas?

Thanks,

Tina

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 26, 2010, 05:49:28 pm
Having exact same issue going to 3.2.3
Database Error Code: Duplicate key name 'index_medium_id', 1061.

will try to drop and re-run upgrade.

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 26, 2010, 06:06:47 pm
The upgrade checks for one key:

    function upgrade_3_2_1($rev)
    {
        //CRM-6565 check if Activity Index is already exists or not.
        $addActivityTypeIndex = true;
        $indexes = CRM_Core_DAO::executeQuery( 'SHOW INDEXES FROM civicrm_activity' );
        while ( $indexes->fetch( ) ) {
            if( $indexes->Key_name == 'UI_activity_type_id' ){
                $addActivityTypeIndex = false;
            }
        }

But if you don't have that one it assumes you don't have the other offending keys - you could try tinkering with that funciton
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

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 26, 2010, 06:10:57 pm
I think i have some other issues - will try http://wiki.civicrm.org/confluence/display/CRMDOC32/Ensuring+Schema+Integrity+on+Upgrades to clean up db structure.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
September 26, 2010, 06:55:28 pm
Does anyone know where i can get a current 3.2 database schema?  Instructions say "Import the original database structure from the same version of CiviCRM you are currently using: civicrm/sql/civicrm.sql (this file is found relative to your root civicrm directory) " but that seems dated.  there are several schema files there.  do i load several to get a complete structure?  thx. s.

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 26, 2010, 07:12:51 pm
There should be an up-to-date file of that name in each civicrm version - ie up-to-date as of that version so if you get the one from a civicrm 3.2.3 install you should have an up-to-date one
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
October 03, 2010, 09:38:32 pm
In my upgrade from 3.1.5 to 3.2.3 I apparently had a partial upgrade which left tables which the upgrade script would not touch. Here is what I had to do to get the upgrade to work.

Code: [Select]
DROP TABLE `civicrm_entity_financial_trxn`;
DROP TABLE `civicrm_financial_account`;
DROP TABLE `civicrm_website`;
DROP TABLE `civicrm_address_format`;
ALTER TABLE `civicrm_activity` DROP INDEX `index_medium_id` ;
ALTER TABLE `civicrm_activity` DROP INDEX `index_is_current_revision` ;
ALTER TABLE `civicrm_activity` DROP INDEX `index_is_deleted` ;

For me the tables were all empty since I had reverted to the 3.1.5 php. Anyone thinking of cutting and pasting these commands in to phpmyadmin would be advised to see if that is true in their case.

stefanw

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
    • channelAustin
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.14
  • MySQL version: 5.1.49-1ubuntu8.1-log5.1.49
  • PHP version: 5.3.3-1ubuntu9.5
Re: upgrade 2.2.2 to 3.2 - error message during upgrade relating to civicrm_activit
October 13, 2010, 11:18:22 am
I encountered similar errors described in this thread when upgrading from 3.1.5 to 3.2 and found TallDavid's suggest above to be helpful. I first drop the indexes in the civicrm activity table and re-ran the script and got an error, but when i re-imported the backed up database and THEN dropped those indexes it was a successful upgrade.

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.