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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Issues with upgrade from 1.9 to 2.0
Pages: [1]

Author Topic: Issues with upgrade from 1.9 to 2.0  (Read 3589 times)

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Issues with upgrade from 1.9 to 2.0
April 30, 2008, 07:37:00 am
I'm trying to upgrade from 1.9 to 2.0 on Drupal 5.7 running MySQL 5.  I get to step 5 of the upgrade (custom data upgrade step) and when I click next on that step I get the following error:

Error Details:

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

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] =>
INSERT INTO custom_value_1_Convention_Form (domain_id,entity_id,State)
SELECT 1, cv.entity_id, cv.int_data FROM civicrm_custom_value cv
WHERE cv.custom_field_id=52
ON DUPLICATE KEY UPDATE State=cv.int_data [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`variantc_civicrm/custom_value_1_Convention_Form`, CONSTRAINT `FK_custom_value_1_Convention_Form_State` FOREIGN KEY (`State`) REFERENCES `civicrm_state_province` (`id`) ON DELETE SET NULL)]
    [type] => DB_Error
    [user_info] =>
INSERT INTO custom_value_1_Convention_Form (domain_id,entity_id,State)
SELECT 1, cv.entity_id, cv.int_data FROM civicrm_custom_value cv
WHERE cv.custom_field_id=52
ON DUPLICATE KEY UPDATE State=cv.int_data [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`variantc_civicrm/custom_value_1_Convention_Form`, CONSTRAINT `FK_custom_value_1_Convention_Form_State` FOREIGN KEY (`State`) REFERENCES `civicrm_state_province` (`id`) ON DELETE SET NULL)]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="
INSERT INTO custom_value_1_Convention_Form (domain_id,entity_id,State)
SELECT 1, cv.entity_id, cv.int_data FROM civicrm_custom_value cv
WHERE cv.custom_field_id=52
ON DUPLICATE KEY UPDATE State=cv.int_data [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`variantc_civicrm/custom_value_1_Convention_Form`, CONSTRAINT `FK_custom_value_1_Convention_Form_State` FOREIGN KEY (`State`) REFERENCES `civicrm_state_province` (`id`) ON DELETE SET NULL)]"]
)



Now, I do know that I'm taking a database that was originally on a MySQL 4.1 server and now I'm running that data on MySQL 5.

I also only have access to the database via phpMyAdmin and not via shell.

Please help!

Thanks!


Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Issues with upgrade from 1.9 to 2.0
April 30, 2008, 08:28:39 am
You might want to try latest CiviCRM 2.0.2 / 2.0.3, since there has been quite a lot of improvements with upgrade's cleanup process and other steps - which might solve your issue.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Re: Issues with upgrade from 1.9 to 2.0
April 30, 2008, 08:50:01 am
I tried it with version 2.0.3.  Didn't work.  I have this error now ... doesn't even load my Drupal site:

Sorry. A non-recoverable error has occurred. The error trace below might help to resolve the issue

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

       
Code: [Select]
=> -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT *
 FROM civicrm_component
 
 
 
 
 
 [nativecode=1146 ** Table 'variantc_civicrm.civicrm_component' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT *
 FROM civicrm_component
 
 
 
 
 
 [nativecode=1146 ** Table 'variantc_civicrm.civicrm_component' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT *
 FROM civicrm_component
 
 
 
 
 
 [nativecode=1146 ** Table 'variantc_civicrm.civicrm_component' doesn't exist]"]
)

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Re: Issues with upgrade from 1.9 to 2.0
April 30, 2008, 09:09:31 am
Additionally, if I just do a clean install of CiviCRM 2.0.3 in another Drupal site on my server and then try and import my data into that new CiviCRM database, the import fails.  It's telling me I already have tables in my database and it won't import my existing data.


Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Issues with upgrade from 1.9 to 2.0
April 30, 2008, 09:24:15 pm
Assuming you want to import 1.9 db data, Direct db import won't work.

The error you shown shouldn't appear if you following steps from - http://wiki.civicrm.org/confluence/display/CRMDOC/Upgrade+Drupal+Sites+to+2.0

Could you be specific -
1. how many steps you have followed
2. Which step you are stuck on
3. Whats the url which caused the above displayed error
« Last Edit: April 30, 2008, 09:59:38 pm by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

stephenrockwell

  • Guest
Re: Issues with upgrade from 1.9 to 2.0
May 03, 2008, 05:03:58 pm
I'm getting a similar error.  I have followed all the steps including creating a new database and dumping data into that database.  what i don't understand is the need for that table referenced below...

drupal 1.9 - > 2.0.3

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

       
Code: [Select]
=> -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT *
 FROM civicrm_component
 
 
 
 
 
 [nativecode=1146 ** Table 'ipccrm.civicrm_component' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT *
 FROM civicrm_component
 
 
 
 
 
 [nativecode=1146 ** Table 'ipccrm.civicrm_component' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT *
 FROM civicrm_component
 
 
 
 
 
 [nativecode=1146 ** Table 'ipccrm.civicrm_component' doesn't exist]"]
)

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Issues with upgrade from 1.9 to 2.0
May 03, 2008, 11:35:53 pm
The error implies that you have codebase of v2.0 which expects the civicrm_component table to be present in the database.
But since you haven't successfully upgraded your database yet, from 1.9 -> 2.0, you see this error.

Accessing the url - http://...civicrm/upgrade?reset=1, should bypass this error and take you to upgrade screen, provided you have properly followed the instructions on the wiki.
« Last Edit: May 03, 2008, 11:37:41 pm by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

stephenrockwell

  • Guest
Re: Issues with upgrade from 1.9 to 2.0
May 04, 2008, 04:44:00 am
I was upgrading from 1.8, so I ran the update script from 1.8 to 1.9.

I then followed the instructions for creating new database...doing a new 1.9 build and then dumping the data.   

When I go to: /index.php?q=civicrm/upgrade&reset=1
 
its telling me that my database is not 1.9. 

I guess I'll try again...

stephenrockwell

  • Guest
Re: Issues with upgrade from 1.9 to 2.0
May 04, 2008, 05:14:18 am
i just followed all the procedures again and received the same error.   I looked for the table civicrm_component and its not in my database.  I have a 101 tables total. 

Any assistance you could provide would be greatly appreciated.

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Issues with upgrade from 1.9 to 2.0
May 04, 2008, 06:00:02 am
Quote from: stephenrockwell on May 04, 2008, 04:44:00 am
When I go to: /index.php?q=civicrm/upgrade&reset=1
 
its telling me that my database is not 1.9. 

The possibility of error could be -
1. Something went wrong when upgrading from 1.8 -> 1.9, resulting in invalid 1.9 db
OR
2. You had a valid 1.9 db, but while following the 1.9 -> 2.0 upgrade process, due to some reason / error you got out of the upgrade process - resulting in invalid 1.9 db.

My suggestion at this stage would be :
1. Again do a clean 1.8 -> 1.9 upgrade, since you look to have a corrupted 1.9 db.
2. Take the back up of your new 1.9 db
3. Visit the upgrade url (..civicrm/upgrade&reset=1) to verify if the 1.9 db is valid (don't receive the same above error)
4. Make sure you have followed the instructions on the wiki.
5. While following 1.9->2.0 upgrade process if you encounter any error (which is unlikely), again start 1.9->2.0 upgrade with the valid 1.9 db (got at step2) with the fix (of the error you encountered).
Note - make sure you always have a copy of valid 1.9 db


Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Issues with upgrade from 1.9 to 2.0

This forum was archived on 2017-11-26.