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 upgrading 3.0.2 to 3.0.3
Pages: [1]

Author Topic: Error upgrading 3.0.2 to 3.0.3  (Read 3336 times)

cjdavis

  • Guest
Error upgrading 3.0.2 to 3.0.3
December 18, 2009, 07:02:50 pm
Upgrading from 3.0 to 3.0.1 and then 3.0.2 were flawless. Unfortunately attempting to upgrade to 3.0.3 resulted in the following error:

Code: [Select]
    Sorry. A non-recoverable error has occurred.

    DB Error: a515ac9c2796ca0e23adbe92c68fc9fc

    Database Error Code: Error on rename of './grt3_civicrm/civicrm_custom_group' to './grt3_civicrm/#sql2-2d78-1cd08' (errno: 152), 1025

    Return to home page.

Error Details:

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

    [code] => a515ac9c2796ca0e23adbe92c68fc9fc
    [message] => DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
    [mode] => 16
    [debug_info] => ALTER TABLE `civicrm_custom_group`
DROP FOREIGN KEY `FK_civicrm_custom_group_created_id` [nativecode=1025 ** Error on rename of './grt3_civicrm/civicrm_custom_group' to './grt3_civicrm/#sql2-2d78-1cd08' (errno: 152)]
    [type] => DB_Error
    [user_info] => ALTER TABLE `civicrm_custom_group`
DROP FOREIGN KEY `FK_civicrm_custom_group_created_id` [nativecode=1025 ** Error on rename of './grt3_civicrm/civicrm_custom_group' to './grt3_civicrm/#sql2-2d78-1cd08' (errno: 152)]
    [to_string] => [db_error: message="DB Error: a515ac9c2796ca0e23adbe92c68fc9fc" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info="ALTER TABLE `civicrm_custom_group`
DROP FOREIGN KEY `FK_civicrm_custom_group_created_id` [nativecode=1025 ** Error on rename of './grt3_civicrm/civicrm_custom_group' to './grt3_civicrm/#sql2-2d78-1cd08' (errno: 152)]"]
)
[/code]

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error upgrading 3.0.2 to 3.0.3
December 19, 2009, 02:16:39 am
Your v3.0 was fresh or upgrade install?

Kurund
Found this reply helpful? Support CiviCRM

cjdavis

  • Guest
Re: Error upgrading 3.0.2 to 3.0.3
December 19, 2009, 11:19:45 pm
The v3.0 installation was completely new.

Last week I tried installing an upgrade to the v3.1 beta on a copy of the site, and I believe I got a similar error during the upgrade as well.

Should I submit an issue about this?

I can provide access to a copy of the site if that would help as well.

Thanks,
Chris

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error upgrading 3.0.2 to 3.0.3
December 20, 2009, 01:16:34 am
Can you email copy of your 3.0 db to deepak[at]webaccess[dot]co[dot]in, we will investigate and get back to you.

Kurund
Found this reply helpful? Support CiviCRM

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Error upgrading 3.0.2 to 3.0.3
December 20, 2009, 09:55:26 pm
Chris,

We went through your database and found that it doesn't have any of the constraints.
One of the solution is to rebuild your schema  - http://wiki.civicrm.org/confluence/display/CRMDOC/Ensuring+Schema+Integrity+on+Upgrades and then go for upgrade.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

najoory

  • Guest
Re: Error upgrading 3.0.2 to 3.0.3
December 21, 2009, 12:04:13 am
How to upgrade 3.0.2 - 3.0.3 ?   ::) I found in manual only 2.2 - 3.0.2.

UPD: Bingo!

http://host/civicrm/upgrade?reset=1
« Last Edit: December 21, 2009, 12:06:50 am by najoory »

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Error upgrading 3.0.2 to 3.0.3
December 21, 2009, 12:43:59 am
Quote
I found in manual only 2.2 - 3.0.2.

Documentation fixed. Check again. Steps are exactly same for database versions >= 2.2.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

ghing

  • Guest
Re: Error upgrading 3.0.2 to 3.0.3
December 22, 2009, 02:26:05 pm
I had this same error.  Following the instructions at http://wiki.civicrm.org/confluence/display/CRMDOC/Ensuring+Schema+Integrity+on+Upgrades worked for me.

Note that my custom data tables were prefixed with civicrm_value_.

Note also that I had to either  also create my import job tables, or delete them from your data dump sql.

# Dump the data from my 3.0.2 CiviCRM database
$ mysqldump --no-create-info -u civicrm -p civicrm_memberdbtest | gzip > ~drupal/backups/snapshots/civicrm_memberdbtest-2009-12-22-pre_upgrade_to_3.0.3-data.sql.gz

# Dump the schema from my custom tables
mysqldump --no-data -u civicrm -p civicrm_memberdbtest civicrm_value_form_completed_date_3 civicrm_value_ip_address_ranges_1 civicrm_value_materials_expenditures_2 civicrm_value_new_user_registration_5 civicrm_value_purchase_proposal_program_4 | gzip  > ~drupal/backups/snapshots/civicrm_memberdbtest-2009-12-22-pre_upgrade_to_3.0.3-custom_schema.sql.gz

# I had already deleted the 3.0.2 files, so I need to unpack them before I can load the default 3.0.2 schema
cd ~/tmp/
tar zxf ~drupal/packages/2009-11-12-civicrm_upgrade_to_stable_3/civicrm-3.0.2-drupal.tar.gz

# Load the default schema
mysql -u civicrm -p civicrm_memberdbtest < ~/tmp/civicrm/sql/civicrm.mysql

# Load the custom data tables schema
gunzip -c ~drupal/backups/snapshots/civicrm_memberdbtest-2009-12-22-pre_upgrade_to_3.0.3-custom_schema.sql.gz | mysql -u civicrm -p civicrm_memberdbtest

# Load the old data
gunzip -c ~drupal/backups/snapshots/civicrm_memberdbtest-2009-12-22-pre_upgrade_to_3.0.3-data.sql.gz | mysql -u civicrm -p civicrm_memberdbtest

# OOPS! The job import data tables weren't found.  I just deleted the relevent SQL statements from my data dump
gunzip -c ~drupal/backups/snapshots/civicrm_memberdbtest-2009-12-22-pre_upgrade_to_3.0.3-data.sql.gz > ~/tmp/civicrm_data.sql
vi ~/tmp/civicrm_data.sql

# Try to load the old data again
mysql -u civicrm -p civicrm_memberdbtest < ~/tmp/civicrm_data.sql

After this I was able to complete the database upgrade at /civicrm/upgrade?reset=1 without problems.

cjdavis

  • Guest
Re: Error upgrading 3.0.2 to 3.0.3
January 31, 2010, 12:34:09 pm
Quote from: Deepak Srivastava on December 20, 2009, 09:55:26 pm
Chris,

We went through your database and found that it doesn't have any of the constraints.
One of the solution is to rebuild your schema  - http://wiki.civicrm.org/confluence/display/CRMDOC/Ensuring+Schema+Integrity+on+Upgrades and then go for upgrade.

I just wanted to follow up (belatedly) - reloading the schema this way completely fixed the problem, and the subsequent update to 3.0.4 went through without a hitch. I suspect that a late-night dump / restore done with phpmyadmin during development was the culprit. Thanks!
« Last Edit: January 31, 2010, 12:36:09 pm by cjdavis »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Error upgrading 3.0.2 to 3.0.3

This forum was archived on 2017-11-26.