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) »
  • error on upgrade 2.2.7 -> 3.0.4
Pages: 1 [2]

Author Topic: error on upgrade 2.2.7 -> 3.0.4  (Read 5081 times)

nunodonato

  • Guest
Re: error on upgrade 2.2.7 -> 3.0.4
February 05, 2010, 04:41:49 pm
hi again :(
since I wont have chance to hire professional help, I'm still trying to solve this.

I got a hint that maybe the problem came from my 1.9->2.7 upgrade, so the solution might be something else...

What I did, was to do the steps to ensure the DB schema integrity with my initial 2.7 DB.
While importing the data back, I get the errors
Code: [Select]
#1452 - Cannot add or update a child row: a foreign key constraint fails (`amurt_civicrm2/civicrm_activity`, CONSTRAINT `FK_civicrm_activity_source_contact_id` FOREIGN KEY (`source_contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)
I ignored this the last time by using the command to ignore the FK checks, but then that was causing the problem upgrading to 3.0 (altought it upgraded to 2.8 and 2.9 successfully).

Is there any way to fix this DB in its 2.7 version?

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: error on upgrade 2.2.7 -> 3.0.4
February 05, 2010, 04:54:55 pm

there are a few issues with your DB:

1. seems like it was a MyISAM DB for some time at least, and hence the constraints did not exist

2. most likely due to the above there are records in the DB that do have invalid FK constraints. You'll need to clean these up manually using mysql knowledge

3. when doing an import from a mysqldump, disabling FK check is probably your only way to load the DB since mysqldump does not follow table constraints

since u r so persistent, we can try to upgrade your DB. In exchange, u'll need to contribute back to the project for 5 hours by helping other folks on the forum. Note that due to item 1, your DB is potentially in a bad / unrecoverable state

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

nunodonato

  • Guest
Re: error on upgrade 2.2.7 -> 3.0.4
February 05, 2010, 05:00:47 pm
Yes it was MyISAM on the 1.x versions, I then converted the tables to InnoDB when I did the 2.x upgrade. All the tables are listed as InnoDB, but somehow in the end it still says "MyISAM" (I dont know if it has any effect tough...)

I'm using CiviCRM as a volunteer work for non-profit NGO. i'll be glad to help others as much as I can and know.

nunodonato

  • Guest
Re: error on upgrade 2.2.7 -> 3.0.4
February 08, 2010, 10:52:57 pm
so.. what can I do now to have your help?

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: error on upgrade 2.2.7 -> 3.0.4
February 08, 2010, 11:22:17 pm
nunodonato,

Send your compressed db dump to: deepak at webaccess.co.in. We 'll investigate and get back to you.
« Last Edit: February 08, 2010, 11:24:33 pm by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

nunodonato

  • Guest
Re: error on upgrade 2.2.7 -> 3.0.4
February 08, 2010, 11:35:26 pm
Sent.
thank you very much

nunodonato

  • Guest
Re: error on upgrade 2.2.7 -> 3.0.4
February 10, 2010, 01:41:11 am
the upgrade ran smoothly, and then i could successfully upgrade to 3.1.1.
thank you very much  :D

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • error on upgrade 2.2.7 -> 3.0.4

This forum was archived on 2017-11-26.