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) »
  • Help! Upgrade route to 3.0 errors
Pages: [1]

Author Topic: Help! Upgrade route to 3.0 errors  (Read 1433 times)

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Help! Upgrade route to 3.0 errors
October 28, 2009, 10:28:45 am
I have a database that's currently on 2.0.6. I am trying to upgrade it to 3.0. Based on instructions, I know I have to upgrade to 2.1 first.

So I have successfully upgraded my drupal site to Drupal 6. Now I need to upgrade CiviCRM.

When I go to run the upgrade script in my browser, I get this error:
backTrace

/Applications/MAMP/htdocs/stoner/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 258
/Applications/MAMP/htdocs/stoner/sites/all/modules/civicrm/CRM/Upgrade/TwoOne/Page/Upgrade.php, fatal, 97
/Applications/MAMP/htdocs/stoner/sites/all/modules/civicrm/CRM/Upgrade/TwoOne/Page/Upgrade.php, runForm, 61
/Applications/MAMP/htdocs/stoner/sites/all/modules/civicrm/install/upgrade.php, run, 48
/Applications/MAMP/htdocs/stoner/sites/all/modules/civicrm/install/upgrade.php, run, 51

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    Database consistency check failed. FK constraint names not in the required format. Please rebuild your 2.0 database to ensure schema integrity.

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

OK, so then I followed my own instructions here as recommended in the 2.1 upgrade if you're having issues:
http://forum.civicrm.org/index.php/topic,4259.msg21599.html#msg21599

Unfortunately, when I get to step 7 where I need to import my data dump, I get the following mysql error:

INSERT INTO `civicrm_acl` ( `id` , `domain_id` , `name` , `deny` , `entity_table` , `entity_id` , `operation` , `object_table` , `object_id` , `acl_table` , `acl_id` , `is_active` ) 
VALUES ( 1, 1, 'Edit All Contacts', 0, 'civicrm_acl_role', 1, 'Edit', 'civicrm_saved_search', 0, NULL , NULL , 1 ) ;

MySQL said:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`stoneran_civi/civicrm_acl`, CONSTRAINT `FK_civicrm_acl_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`))

So I can't even get my data into a new 2.0 database without the FK issues. What should I do now?



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: Help! Upgrade route to 3.0 errors
October 28, 2009, 10:36:00 am

does civicrm_domain have an entry in the table with id = 1

the FK is complaining that its missing, which is a pretty important entry :)

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

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Help! Upgrade route to 3.0 errors
October 28, 2009, 10:38:58 am
the data dump that i'm trying to upload indeed has 1 entry in it with an id of '1'.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Help! Upgrade route to 3.0 errors
October 28, 2009, 10:47:40 am
here's my dumped data for civicrm_acl

Code: [Select]
--
-- Dumping data for table `civicrm_acl`
--

INSERT INTO `civicrm_acl` (`id`, `domain_id`, `name`, `deny`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `acl_table`, `acl_id`, `is_active`) VALUES
(1, 1, 'Edit All Contacts', 0, 'civicrm_acl_role', 1, 'Edit', 'civicrm_saved_search', 0, NULL, NULL, 1);

and then civicrm_domain (i removed the blurb info for security reasons, but the rest of the data i have kept...)

Code: [Select]
--
-- Dumping data for table `civicrm_domain`
--

INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `email_name`, `email_address`, `email_domain`, `email_return_path`, `config_backend`, `version`, `loc_block_id`) VALUES
(1, 'Me', NULL, 'Me', 'office@mysite.com', 'mysite.com', NULL, '', '2.0', 1);

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: Help! Upgrade route to 3.0 errors
October 28, 2009, 10:53:28 am

can u disable foreign key checks:

http://forum.civicrm.org/index.php/topic,4917.0.html

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

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Help! Upgrade route to 3.0 errors
October 28, 2009, 11:07:55 am
thanks lobo; fixed.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Help! Upgrade route to 3.0 errors

This forum was archived on 2017-11-26.