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) »
  • Foreign key upgrade error 1.6 -> 1.7
Pages: [1]

Author Topic: Foreign key upgrade error 1.6 -> 1.7  (Read 596 times)

Devan879

  • Guest
Foreign key upgrade error 1.6 -> 1.7
November 12, 2010, 10:46:51 pm
Hi,
Having searched the old Nabble posts and this forum, we are still hunting for a solution to yet another foreign key error message.

We have been upgrading a drupal 5.1 site from civiCRM 1.6 to 1.7.9327

We reached step 8 in the upgrade instructions and then received the following error message after logging in as root user and visiting  civiCRM:

   
Code:

  Sorry. A non-recoverable error has occurred.

    Database Error Code: Cannot add or update a child row: a foreign key constraint fails, 1216

    Return to CiviCRM menu.

Error Details:

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

       
Code: [Select]
=> -3
    [message] => DB Error: constraint violation
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_contact (domain_id , contact_type , sort_name , display_name , hash ) VALUES ( 1 , 'Individual' , 'webmaster@blah.asn.au' , 'webmaster@blah.asn.au' , 'e0688d9adbee548bf2232b9ce0da0653' )  [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_contact (domain_id , contact_type , sort_name , display_name , hash ) VALUES ( 1 , 'Individual' , 'webmaster@blah.asn.au' , 'webmaster@blah.asn.au' , 'e0688d9adbee548bf2232b9ce0da0653' )  [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]
    [to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contact (domain_id , contact_type , sort_name , display_name , hash ) VALUES ( 1 , 'Individual' , 'webmaster@blah.asn.au' , 'webmaster@blah.asn.au' , 'e0688d9adbee548bf2232b9ce0da0653' )  [nativecode=1216 ** Cannot add or update a child row: a foreign key constraint fails]"]
)


We have emptied the sessions table and tried to cleanup template cache, but can't even get to the point of turning debugging on.

Hope you can help,

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Foreign key upgrade error 1.6 -> 1.7
November 14, 2010, 06:30:33 am

I dont think any of us who've been around since the 1.x release have any memory of issues with upgrade at that time. as such we are of limited / no help with this problem :(

your best bet would be to take a look at the code and try to reverse engineer/figure things out

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Foreign key upgrade error 1.6 -> 1.7

This forum was archived on 2017-11-26.