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) »
  • Upgrade errors in SQL going from 4.1.3 to 4.4.5
Pages: [1]

Author Topic: Upgrade errors in SQL going from 4.1.3 to 4.4.5  (Read 561 times)

fourpoints

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: x
  • CMS version: drupal
  • MySQL version: x
  • PHP version: x
Upgrade errors in SQL going from 4.1.3 to 4.4.5
May 27, 2014, 12:17:54 pm
I am moving a client up and I know Drupal 6 is no longer supported officially but hopefully there's some kind souls that can assist.

I did the data integrity steps Civi outlines but now during upgrade, I'm stuck here:

[Error: Upgrade DB to 4.2.alpha1: SQL]
Error Field   Error Value
Type   DB_Error
Code   a515ac9c2796ca0e23adbe92c68fc9fc
Message   DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
Mode   16
UserInfo   ALTER TABLE `civicrm_batch` ADD `saved_search_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Saved Search ID' [nativecode=1060 ** Duplicate column name 'saved_search_id']
DebugInfo   ALTER TABLE `civicrm_batch` ADD `saved_search_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Saved Search ID' [nativecode=1060 ** Duplicate column name 'saved_search_id']
PEAR_Exception: DB Error: a515ac9c2796ca0e23adbe92c68fc9fc in unknown on line unknown
- DB_Error: DB Error: a515ac9c2796ca0e23adbe92c68fc9fc 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))   /home/manalife/public_html/sites/all/modules/civicrm/packages/PEAR.php:931
2   PEAR_Error->PEAR_Error('DB Error: a515ac…', 'a515ac9c2796ca0e…', 16, Array, 'ALTER TABLE `civ…')   /home/manalife/public_html/sites/all/modules/civicrm/packages/DB.php:972
3   DB_Error->DB_Error('a515ac9c2796ca0e…', 16, Array, 'ALTER TABLE `civ…')   /home/manalife/public_html/sites/all/modules/civicrm/packages/PEAR.php:564
4   PEAR->raiseError(null, 'a515ac9c2796ca0e…', null, null, 'ALTER TABLE `civ…', 'DB_Error', true)   /home/manalife/public_html/sites/all/modules/civicrm/packages/DB/common.php:1905
5   DB_common->raiseError('a515ac9c2796ca0e…', null, null, null, '1060 ** Duplicat…')   /home/manalife/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php:928
6   DB_mysqli->mysqliRaiseError()   /home/manalife/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php:402
7   DB_mysqli->simpleQuery('ALTER TABLE `civ…')   /home/manalife/public_html/sites/all/modules/civicrm/packages/DB/common.php:1216
8   DB_common->query('ALTER TABLE `civ…')   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Utils/File.php:284
9   CRM_Utils_File::sourceSQLFile('mysqli://manalif…', ' SELECT @wo…', null, true)   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Upgrade/Form.php:160
10   CRM_Upgrade_Form->source(' SELECT @wo…', true)   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Upgrade/Form.php:300
11   CRM_Upgrade_Form->processLocales('/home/manalife/p…', '4.2.alpha1')   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Upgrade/Form.php:324
12   CRM_Upgrade_Form->processSQL('4.2.alpha1')   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourTwo.php:413
13   CRM_Upgrade_Incremental_php_FourTwo::task_4_2_x_runSql(Object(CRM_Queue_TaskContext), '4.2.alpha1')   unknown:unknown
14   call_user_func_array(Array, Array)   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Queue/Task.php:79
15   CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Queue/Runner.php:186
16   CRM_Queue_Runner->runNext(true)   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Queue/Page/AJAX.php:44
17   {closure}()   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Queue/ErrorPolicy.php:80
18   CRM_Queue_ErrorPolicy->call(Object(Closure))   /home/manalife/public_html/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)   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:289
21   CRM_Core_Invoke::runItem(Array)   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:72
22   CRM_Core_Invoke::_invoke(Array)   /home/manalife/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php:52
23   CRM_Core_Invoke::invoke(Array)   /home/manalife/public_html/sites/all/modules/civicrm/drupal/civicrm.module:405
24   civicrm_invoke('upgrade', 'queue', 'ajax', 'runNext')   unknown:unknown
25   call_user_func_array('civicrm_invoke', Array)   /home/manalife/public_html/includes/menu.inc:350
26   menu_execute_active_handler()   /home/manalife/public_html/index.php:17
27   {main}


I also had two other error messages come up which I could manually fix but that doesn't seem right either.
ALTER TABLE `civicrm_batch` ADD UNIQUE KEY `UI_name` ( name ) [nativecode=1061 ** Duplicate key name 'UI_name']
ALTER TABLE `civicrm_prevnext_cache` ADD COLUMN is_selected tinyint(4) DEFAULT '0' [nativecode=1060 ** Duplicate column name 'is_selected']

I would think by using the clean civi structure, I wouldn't have such issues. Any help??

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade errors in SQL going from 4.1.3 to 4.4.5
May 27, 2014, 12:47:53 pm
Quote from: fourpoints on May 27, 2014, 12:17:54 pm
I would think by using the clean civi structure, I wouldn't have such issues. Any help??

It's not always a guarantee. :)

Can you try running the upgrade with an earlier version of CiviCRM? Such as 4.2.2?
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.

fourpoints

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: x
  • CMS version: drupal
  • MySQL version: x
  • PHP version: x
Re: Upgrade errors in SQL going from 4.1.3 to 4.4.5
May 27, 2014, 02:31:25 pm
I tried with 4.2.2 per your suggestion and i still get the same error:
[Error: Upgrade DB to 4.2.alpha1: SQL]
Error Field   Error Value
Type   DB_Error
Code   a515ac9c2796ca0e23adbe92c68fc9fc
Message   DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
Mode   16
UserInfo   ALTER TABLE `civicrm_batch` ADD `saved_search_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Saved Search ID' [nativecode=1060 ** Duplicate column name 'saved_search_id']
DebugInfo   ALTER TABLE `civicrm_batch` ADD `saved_search_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to Saved Search ID' [nativecode=1060 ** Duplicate column name 'saved_search_id']

But I do not know how to remove that column. When I try to drop saved_search_id, I get the error:
SQL query:
ALTER TABLE civicrm_batch DROP saved_search_id;

MySQL said: Documentation
#1025 - Error on rename of './mydbasename/#sql-2253_1d7a59c' to './mydbasename/civicrm_batch' (errno: 150)

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


I'm going to try a smaller incremental upgrade. Although not sure the data file, which is prepped for 4.4.5, will be workable if I upgrade to just 4.1.5 (currently on 4.1.3)
« Last Edit: May 27, 2014, 03:04:49 pm by fourpoints »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrade errors in SQL going from 4.1.3 to 4.4.5
May 28, 2014, 03:38:52 am
When you do the schema verification process, you should have, at some point, a dump of just the schema. Can you check if that rogue column is there? It should not be.
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.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade errors in SQL going from 4.1.3 to 4.4.5

This forum was archived on 2017-11-26.