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) »
  • More 1.9 -> 2.0.2 Foreign Key Issues
Pages: [1]

Author Topic: More 1.9 -> 2.0.2 Foreign Key Issues  (Read 1678 times)

Erik Hopp

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
More 1.9 -> 2.0.2 Foreign Key Issues
April 23, 2008, 05:16:56 pm
Hi.

Myself and a colleague are having similar foreign key issues attempting to upgrade from 1.9 to 2.0.2. We are using MySQL 5 and PHP 5.

We have followed the instructions through step 6 [http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrade+Drupal+Sites+to+2.0#UpgradeDrupalSitesto2.0-6.Unpackthe2.0package] and upon running the update script at Step 7, have encountered an error:
Code: [Select]
Database consistency check failed for step 1. FK constraint names not in the required format. Please rebuild your 1.9 database to ensure schema integrity.

We've searched through forum posts and found some relevant ones:
http://forum.civicrm.org/index.php?topic=2991.0
http://forum.civicrm.org/index.php/topic,3128.msg13786.html#msg13786
http://forum.civicrm.org/index.php/topic,2771.0.html
http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrade+Drupal+Sites+to+2.0?focusedCommentId=7372809#comment-7372809

None of the custom data fields or groups have a name of "null". I'm having a hard time trying to figure out other ways to narrow down the issue.

Is there some way to figure out which table the error is coming from? I see some other posts where people seem to have narrowed the Foreign Key errors down to a specific table. Is there a setting that I can turn on that will spit out more verbose errors?

Any other suggestions to ensure the data is correct (or to find the orphaned or bad data)?

Thanks.

Erik.

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: More 1.9 -> 2.0.2 Foreign Key Issues
April 24, 2008, 01:01:11 am

your best bet is to add debug code to:

CRM/Core/DAO.php, function checkFKConstraintInFormat

You can echo the result of the preg_match and see which FK failed. Are you sure that you have normalized the schema

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

Colin Sagan

  • Guest
Re: More 1.9 -> 2.0.2 Foreign Key Issues
May 03, 2008, 12:44:47 am
Just to wrap this up, the upgrade has now worked for us using 2.0.3.

Also for anyone else finding this, make sure you don't confuse CIVICRM_DSN with CIVICRM_UF_DSN. Whoops.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • More 1.9 -> 2.0.2 Foreign Key Issues

This forum was archived on 2017-11-26.