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 halts upgrade at 4.3.alpha1
Pages: [1]

Author Topic: Error halts upgrade at 4.3.alpha1  (Read 470 times)

robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Error halts upgrade at 4.3.alpha1
April 27, 2013, 06:16:23 pm
I currently have civi 4.2.8 running on drupal 7.22.  I have been working with a copy of production to test an upgrade to 4.3.1 but I cannot get past the error copied below.  Any suggestions? 


CiviCRM Upgrade Tasks
[Error: Upgrade DB to 4.3.alpha1: SQL]
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 'yfc_website.#sql-42f_16b' (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 'yfc_website.#sql-42f_16b' (errno: 121)]
PEAR_Exception: DB Error: can not create in unknown on line unknown
- DB_Error: DB Error: can not create in unknown on line unknown
Exception trace
#   Function   Location
0   CRM_Core_Error::exceptionHandler(Object(DB_Error))   unknown:unknown
1   call_user_func(Array, Object(DB_Error))   /var/www/web/sites/all/modules/civicrm/packages/PEAR.php:931
2   PEAR_Error->PEAR_Error('DB Error: can no…', -15, 16, Array, 'ALTER TABLE `civ…')   /var/www/web/sites/all/modules/civicrm/packages/DB.php:969
3   DB_Error->DB_Error(-15, 16, Array, 'ALTER TABLE `civ…')   /var/www/web/sites/all/modules/civicrm/packages/PEAR.php:564
4   PEAR->raiseError(null, -15, null, null, 'ALTER TABLE `civ…', 'DB_Error', true)   /var/www/web/sites/all/modules/civicrm/packages/DB/common.php:1905
5   DB_common->raiseError(-15, null, null, null, '1005 ** Can't cr…')   /var/www/web/sites/all/modules/civicrm/packages/DB/mysqli.php:928
6   DB_mysqli->mysqliRaiseError()   /var/www/web/sites/all/modules/civicrm/packages/DB/mysqli.php:402
7   DB_mysqli->simpleQuery('ALTER TABLE `civ…')   /var/www/web/sites/all/modules/civicrm/packages/DB/common.php:1216
8   DB_common->query('ALTER TABLE `civ…')   /var/www/web/sites/all/modules/civicrm/CRM/Utils/File.php:284
9   CRM_Utils_File::sourceSQLFile('mysqli://root:sa…', ' SELECT @wo…', null, true)   /var/www/web/sites/all/modules/civicrm/CRM/Upgrade/Form.php:159
10   CRM_Upgrade_Form->source(' SELECT @wo…', true)   /var/www/web/sites/all/modules/civicrm/CRM/Upgrade/Form.php:299
11   CRM_Upgrade_Form->processLocales('/var/www/web/sit…', '4.3.alpha1')   /var/www/web/sites/all/modules/civicrm/CRM/Upgrade/Form.php:323
12   CRM_Upgrade_Form->processSQL('4.3.alpha1')   /var/www/web/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourThree.php:945
13   CRM_Upgrade_Incremental_php_FourThree::task_4_3_x_runSql(Object(CRM_Queue_TaskContext), '4.3.alpha1')   unknown:unknown
14   call_user_func_array(Array, Array)   /var/www/web/sites/all/modules/civicrm/CRM/Queue/Task.php:79
15   CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))   /var/www/web/sites/all/modules/civicrm/CRM/Queue/Runner.php:186
16   CRM_Queue_Runner->runNext(true)   /var/www/web/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:44
17   {closure}()   /var/www/web/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php:80
18   CRM_Queue_ErrorPolicy->call(Object(Closure))   /var/www/web/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:47
19   CRM_Queue_Page_AJAX::runNext(Array)   unknown:unknown
20   call_user_func(Array, Array)   /var/www/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:258
21   CRM_Core_Invoke::runItem(Array)   /var/www/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:70
22   CRM_Core_Invoke::_invoke(Array)   /var/www/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:52
23   CRM_Core_Invoke::invoke(Array)   /var/www/web/sites/all/modules/civicrm/drupal/civicrm.module:436
24   civicrm_invoke('upgrade', 'queue', 'ajax', 'runNext')   unknown:unknown
25   call_user_func_array('civicrm_invoke', Array)   /var/www/web/includes/menu.inc:517
26   menu_execute_active_handler()   /var/www/web/index.php:21
27   {main}

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: Error halts upgrade at 4.3.alpha1
April 27, 2013, 08:24:19 pm

seems like your entity_financ.... has some ids that done exist in the financial accounts table. might want to check the values in that table

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

robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Re: Error halts upgrade at 4.3.alpha1
April 28, 2013, 05:16:25 am
Ah, I see.  The DB has tables hanging around from a previous failed attempt to upgrade.  Removing those tables allowed it to finish.  Thanks.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Error halts upgrade at 4.3.alpha1

This forum was archived on 2017-11-26.