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) »
  • Unrecoverable error upgrading to 2.0
Pages: [1]

Author Topic: Unrecoverable error upgrading to 2.0  (Read 1006 times)

sfr-randy

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
Unrecoverable error upgrading to 2.0
July 03, 2010, 09:07:11 am
I'm upgrading a Civicrm 1.8 install under drupal 5. After successfully upgrading the database from MyISAM to InnoDB and applying the 1.9 upgrade SQL successfully, I get the following error in step 5 when running the 2.0 upgrade. I suspect there is a data problem in the database, but not sure where to look to fix. Can someone provide some expert guidance please?

Thanks for the assist. This is my holiday weekend project.

Randy

-------------------------------------------------------------------------------------

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] =>
INSERT INTO civicrm_value_1_alumni_information (domain_id,entity_id,maiden_name)
SELECT 1, cv.entity_id, cv.char_data FROM civicrm_custom_value cv
WHERE cv.custom_field_id=5
ON DUPLICATE KEY UPDATE maiden_name=cv.char_data [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm20/civicrm_value_1_alumni_information`, CONSTRAINT `FK_civicrm_value_1_alumni_information_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [type] => DB_Error
    [user_info] =>
INSERT INTO civicrm_value_1_alumni_information (domain_id,entity_id,maiden_name)
SELECT 1, cv.entity_id, cv.char_data FROM civicrm_custom_value cv
WHERE cv.custom_field_id=5
ON DUPLICATE KEY UPDATE maiden_name=cv.char_data [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm20/civicrm_value_1_alumni_information`, CONSTRAINT `FK_civicrm_value_1_alumni_information_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="
INSERT INTO civicrm_value_1_alumni_information (domain_id,entity_id,maiden_name)
SELECT 1, cv.entity_id, cv.char_data FROM civicrm_custom_value cv
WHERE cv.custom_field_id=5
ON DUPLICATE KEY UPDATE maiden_name=cv.char_data [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`civicrm20/civicrm_value_1_alumni_information`, CONSTRAINT `FK_civicrm_value_1_alumni_information_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Unrecoverable error upgrading to 2.0
July 03, 2010, 01:57:34 pm
It's hard for us to support older versions of CiviCRM, so I would suggest hiring someone to professional list (http://civicrm.org/professional) to your upgrade.

Hth
Kurund
Found this reply helpful? Support CiviCRM

sfr-randy

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
Re: Unrecoverable error upgrading to 2.0
July 03, 2010, 03:56:22 pm
I discovered that I had a lot of records in the civicrm_custom_value table with a value for entity_table that was non-existent. I deleted those records and the database upgrade completed successfully.


Randy

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Unrecoverable error upgrading to 2.0

This forum was archived on 2017-11-26.