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) »
  • 4.2.8 to 4.4.3 Upgrade Fails : DB Check
Pages: [1]

Author Topic: 4.2.8 to 4.4.3 Upgrade Fails : DB Check  (Read 1752 times)

kecker

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 06, 2013, 08:28:02 pm
In upgrading the database I keep getting this error:

[Error: Upgrade DB to 4.3.alpha1: SQL]
Error Field   Error Value
Type   DB_Error
Code   -5
Message   DB Error: already exists
Mode   16
UserInfo   RENAME TABLE `civicrm_contribution_type` TO `civicrm_financial_type` [nativecode=1050 ** Table 'civicrm_financial_type' already exists]
DebugInfo   RENAME TABLE `civicrm_contribution_type` TO `civicrm_financial_type` [nativecode=1050 ** Table 'civicrm_financial_type' already exists]

I've seen several similar errors by others but I'm not sure I've really found a good solution for it yet.



Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 08, 2013, 09:16:43 am
You need to delete your database, recreate it fresh (thus totally empty) and then import a good backup. Then try the upgrade again.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

kecker

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 08, 2013, 11:37:52 am
I've been doing that.  I've been doing a fullsite restore from immediatly before the upgrade.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 08, 2013, 11:44:50 am
So drop the civicrm_financial_type table and see if that helps.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

kecker

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 08, 2013, 01:29:33 pm
Which gets me to this.

Error Field   Error Value
Type   DB_Error
Code   -15
Message   DB Error: can not create
Mode   16
UserInfo   ALTER TABLE `civicrm_entity_financial_account` ADD CONSTRAINT `FK_civicrm_entity_financial_account_financial_account_id` FOREIGN KEY (`financial_account_id`) REFERENCES `civicrm_financial_account` (`id`) [nativecode=1005 ** Can't create table 'bpoubuil_sd57.#sql-c2f3_2466b83' (errno: 121)]
DebugInfo   ALTER TABLE `civicrm_entity_financial_account` ADD CONSTRAINT `FK_civicrm_entity_financial_account_financial_account_id` FOREIGN KEY (`financial_account_id`) REFERENCES `civicrm_financial_account` (`id`) [nativecode=1005 ** Can't create table 'bpoubuil_sd57.#sql-c2f3_2466b83' (errno: 121)]

kecker

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 08, 2013, 01:30:55 pm
Before it even gets to this point, I do get a warning screen (see attached).  Is that any sort of clue?

lesley

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 08, 2013, 02:30:56 pm
I got around this error by using a different version of FourThree.php that I found on github here
https://github.com/kurund/civicrm-core/blob/cc405f4e8d717c34a838f2560ee8debeb2237848/CRM/Upgrade/Incremental/php/FourThree.php

I don't know why it would be different from the version in 4.4.3 but it seems to be and it worked for me to get past the 4.3.alpha1 stage

kecker

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 08, 2013, 06:46:55 pm
I'm willing to give it a try, but where does that script go?  What file is it meant to replace??

I've seen a lot of people having problems getting past the 4.3.alpha1 stage so I imagine there is something that was missed in the scripts.

vipul

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 2.x,3.x-4.x
  • CMS version: Drupal,Joomla
  • MySQL version: 5.1.3
  • PHP version: 5.3
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 09, 2013, 12:28:19 am
Hey, You should try upgrading 4.2.8 to 4.3.0 then to last version of 4.3 and finally to 4.4.3.
why I'm suggesting that because there was lot of schema changes from 4.2 to 4.3 and then 4.4

Hope this will help you...

lesley

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 09, 2013, 02:33:49 pm
So having deleted sites/all/modules/civicrm (old version) and replaced with civicrm (4.4.3) go to civicrm/CRM/Upgrade/Incremental/php and replace FourThree.php with the one attached here.
had to upload as .txt so you need to rename

kecker

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 11, 2013, 04:37:32 pm
So basically do the install of the new version, but before I do the DB Upgrade, replace the script with the one you attached?

lesley

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 1
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
December 12, 2013, 01:18:23 am
That's what got me through to the end of the upgrade.
Good luck

sher1

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.61
  • PHP version: 5.3.3
Re: 4.2.8 to 4.4.3 Upgrade Fails : DB Check
January 22, 2014, 03:50:55 pm
I have tried what was suggested and still cannot get past
[Error: Upgrade DB to 4.3.alpha1: SQL]
RENAME TABLE `civicrm_contribution_type` TO `civicrm_financial_type` [nativecode=1050 ** Table 'civicrm_financial_type' already exists]
The table only exists because it was created in the upgrade process. I have checked the db before and it is not there.
I also tried the other FourThree.php file that was suggested and that didn't get me any further.
Ironically it looks like that table was copied from the other one already.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 4.2.8 to 4.4.3 Upgrade Fails : DB Check

This forum was archived on 2017-11-26.