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) »
  • recover FK
Pages: [1]

Author Topic: recover FK  (Read 1133 times)

alfred_nutile

  • Ask me questions
  • ****
  • Posts: 464
  • Karma: 14
    • River Valley Tech Collective
recover FK
April 22, 2009, 07:01:16 pm
I noticed in one thread a quick way to recover the Foreign Key to prevent errors like
Code: [Select]
=> a515ac9c2796ca0e23adbe92c68fc9fc
    [message] => DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
    [mode] => 16
    [debug_info] => ALTER TABLE `civicrm_group_nesting`
    DROP FOREIGN KEY `FK_civicrm_group_nesting_child_group_id` [nativecode=1025 ** Error on rename of './web102_db2/civicrm_group_nesting' to './web102_db2/#sql2-28b2-18b5d1' (errno: 152)]

During an upgrade, in this case 2.1 to 2.2

I think in the backup recovery of 2.1 these where not added back to the tables. I could do it one at a time maybe or I was thinking there was like 10 of them that I could run at once?

For example
http://forum.civicrm.org/index.php/topic,7057.0.html
Had this one
ALTER TABLE `civicrm_group_nesting`
    ADD CONSTRAINT `FK_civicrm_group_nesting_child_group_id` FOREIGN KEY (`child_group_id`) REFERENCES `civicrm_group` (`id`) ON DELETE CASCADE;

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • recover FK

This forum was archived on 2017-11-26.