Answers.Body: <p>Go to the <strong>\civicrm\civicrm\CRM\Upgrade\4.7.alpha1.msg_template</strong> directory</p>
  
  <p>In <strong>civicrm_msg_template.tpl</strong> find the SQL statement that failed and that will indicate the problem. </p>
  
  <p>I had a similar situation where I was forced to upgrade from 4.4 to 4.7.7. I was forced to make corrections and continue the upgrade by commenting out code. Not a process I recommend, but I had no choice. Not recommended for an amateur coder.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-17T16:17:37.890Z
Answers.LastActivityDate: 2017-03-17T16:17:37.890Z
Answers.UserDisplayName: Codedogs
Body: <p>I am running a CiviCRM upgrade on Joomla from 4.6.25 to 4.7.15. The environment is:</p>
  
  <p>Joomla : 3.6.5
  PHP : 5.5.9
  Database 5.5.52
  Apache 2.4.7</p>
  
  <p>PHP Memory 512M
  Execution timeout 240</p>
  
  <p>Installing the upgraded component works fine. I clear out the templates_c cache. I then run the database upgrade script and get the following error:</p>
  
  <p>[Error: Upgrade DB to 4.7.alpha1: SQL]</p>
  
  <p>Error Field Error Value
  Type    DB_Error</p>
  
  <p>Code    -1
  Message DB Error: unknown error</p>
  
  <p>Mode    16</p>
  
  <p>UserInfo    ALTER TABLE <code>civicrm_action_schedule</code> ADD COLUMN <code>filter_contact_language</code> varchar(128) DEFAULT NULL COMMENT 'Used for multilingual installation' [nativecode=1060 ** Duplicate column name 'filter_contact_language']
  DebugInfo   ALTER TABLE <code>civicrm_action_schedule</code> ADD COLUMN <code>filter_contact_language</code> varchar(128) DEFAULT NULL COMMENT 'Used for multilingual installation' 
  [nativecode=1060 ** Duplicate column name 'filter_contact_language']</p>
  
  <p>PEAR_Exception: DB Error: unknown error in unknown on line unknown</p>
  
  <ul>
  <li>DB_Error: DB Error: unknown error in unknown on line unknown</li>
  </ul>
  
  <p>Exception trace</p>
  
  <h1>Function    Location</h1>
  
  <p>0   CRM_Core_Error::exceptionHandler(Object(DB_Error))  unknown:unknown
  1   call_user_func(Array, Object(DB_Error)) /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/PEAR.php:921
  2   PEAR_Error->__construct('DB Error: unknow…', -1, 16, Array, 'ALTER TABLE <code>civ…')    /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB.php:985
  3   DB_Error-&gt;__construct(-1, 16, Array, 'ALTER TABLE</code>civ…')   /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/PEAR.php:575
  4   PEAR->_raiseError(Object(DB_mysqli), null, -1, null, null, 'ALTER TABLE <code>civ…', 'DB_Error', true)   unknown:unknown
  5   call_user_func_array(Array, Array)  /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/PEAR.php:224
  6   PEAR-&gt;__call('raiseError', Array)   /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB/common.php:1905
  7   PEAR-&gt;raiseError(null, -1, null, null, 'ALTER TABLE</code>civ…', 'DB_Error', true)   /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB/common.php:1905
  8   DB_common->raiseError(-1, null, null, null, '1060 ** Duplicat…')    /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php:933
  9   DB_mysqli->mysqliRaiseError()   /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB/mysqli.php:403
  10  DB_mysqli->simpleQuery('ALTER TABLE <code>civ…') /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB/common.php:1216
  11  DB_common-&gt;query('ALTER TABLE</code>civ…')   /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Utils/File.php:353
  12  CRM_Utils_File::sourceSQLFile('mysql://joomcivi…', '-- Add new colum…', null, true) /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php:196
  13  CRM_Upgrade_Form->source('-- Add new colum…', true) /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php:387
  14  CRM_Upgrade_Form->processLocales('/var/www/joomla/…', '4.7.alpha1') /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Form.php:421
  15  CRM_Upgrade_Form->processSQL('4.7.alpha1')  /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Incremental/Base.php:80
  16  CRM_Upgrade_Incremental_Base::runSql(Object(CRM_Queue_TaskContext), '4.7.alpha1')   unknown:unknown
  17  call_user_func_array(Array, Array)  /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Task.php:88
  18  CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))  /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Runner.php:214
  19  CRM_Queue_Runner->runNext(true) /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
  20  CRM_Queue_Page_AJAX::{closure}()    /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
  21  CRM_Queue_ErrorPolicy->call(Object(Closure))    /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
  22  CRM_Queue_Page_AJAX::runNext()  unknown:unknown
  23  call_user_func(Array)   /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:276
  24  CRM_Core_Invoke::runItem(Array) /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:84
  25  CRM_Core_Invoke::_invoke(Array) /var/www/joomla/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:52
  26  CRM_Core_Invoke::invoke(Array)  /var/www/joomla/administrator/components/com_civicrm/civicrm.php:121
  27  civicrm_invoke()    /var/www/joomla/administrator/components/com_civicrm/civicrm.php:40
  28  require_once('/var/www/joomla/…')   /var/www/joomla/libraries/cms/component/helper.php:405
  29  JComponentHelper::executeComponent('/var/www/joomla/…') /var/www/joomla/libraries/cms/component/helper.php:380
  30  JComponentHelper::renderComponent('com_civicrm')    /var/www/joomla/libraries/cms/application/administrator.php:98
  31  JApplicationAdministrator->dispatch()   /var/www/joomla/libraries/cms/application/administrator.php:152
  32  JApplicationAdministrator->doExecute()  /var/www/joomla/libraries/cms/application/cms.php:261
  33  JApplicationCms->execute()  /var/www/joomla/administrator/index.php:51
  34  {main}   </p>
  
  <p>Does anyone have an ideas how to resolve this ? I notice the multilingual errors. This has been installed on the server.</p>
  
  <p>Regards</p>
  
  <p>Damian</p>
  
Tags: <upgrade><database>
Title: Upgrading CiviCRM from 4.6.25 to 4.7.15 fails on database upgrade
ThreadText: # Upgrading CiviCRM from 4.6.25 to 4.7.15 fails on database upgrade
  
  (Asked by: username_0 on 2017-01-31)
  
  I am running a CiviCRM upgrade on Joomla from 4.6.25 to 4.7.15. The environment is:
  
  Joomla : 3.6.5
  PHP : 5.5.9
  Database 5.5.52
  Apache 2.4.7
  
  PHP Memory 512M
  Execution timeout 240
  
  Installing the upgraded component works fine. I clear out the templates\_c cache. I then run the database upgrade script and get the following error:
  
  [Error: Upgrade DB to 4.7.alpha1: SQL]
  
  Error Field Error Value
  Type DB\_Error
  
  Code -1
  Message DB Error: unknown error
  
  Mode 16
  
  UserInfo ALTER TABLE `civicrm_action_schedule` ADD COLUMN `filter_contact_language` varchar(128) DEFAULT NULL COMMENT 'Used for multilingual installation' [nativecode=1060 \*\* Duplicate column name 'filter\_contact\_language']
  DebugInfo ALTER TABLE `civicrm_action_schedule` ADD COLUMN `filter_contact_language` varchar(128) DEFAULT NULL COMMENT 'Used for multilingual installation'
  [nativecode=1060 \*\* Duplicate column name 'filter\_contact\_language']
  
  PEAR\_Exception: DB Error: unknown error in unknown on line unknown
  
  * DB\_Error: DB Error: unknown error 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/joomla/administrator/components/com\_civicrm/civicrm/packages/PEAR.php:921
  2 PEAR\_Error->\_\_construct('DB Error: unknow…', -1, 16, Array, 'ALTER TABLE `civ…') /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB.php:985
  3 DB_Error->__construct(-1, 16, Array, 'ALTER TABLE`civ…') /var/www/joomla/administrator/components/com\_civicrm/civicrm/packages/PEAR.php:575
  4 PEAR->\_raiseError(Object(DB\_mysqli), null, -1, null, null, 'ALTER TABLE `civ…', 'DB_Error', true) unknown:unknown
  5 call_user_func_array(Array, Array) /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/PEAR.php:224
  6 PEAR->__call('raiseError', Array) /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB/common.php:1905
  7 PEAR->raiseError(null, -1, null, null, 'ALTER TABLE`civ…', 'DB\_Error', true) /var/www/joomla/administrator/components/com\_civicrm/civicrm/packages/DB/common.php:1905
  8 DB\_common->raiseError(-1, null, null, null, '1060 \*\* Duplicat…') /var/www/joomla/administrator/components/com\_civicrm/civicrm/packages/DB/mysqli.php:933
  9 DB\_mysqli->mysqliRaiseError() /var/www/joomla/administrator/components/com\_civicrm/civicrm/packages/DB/mysqli.php:403
  10 DB\_mysqli->simpleQuery('ALTER TABLE `civ…') /var/www/joomla/administrator/components/com_civicrm/civicrm/packages/DB/common.php:1216
  11 DB_common->query('ALTER TABLE`civ…') /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Utils/File.php:353
  12 CRM\_Utils\_File::sourceSQLFile('mysql://joomcivi…', '-- Add new colum…', null, true) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Upgrade/Form.php:196
  13 CRM\_Upgrade\_Form->source('-- Add new colum…', true) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Upgrade/Form.php:387
  14 CRM\_Upgrade\_Form->processLocales('/var/www/joomla/…', '4.7.alpha1') /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Upgrade/Form.php:421
  15 CRM\_Upgrade\_Form->processSQL('4.7.alpha1') /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Upgrade/Incremental/Base.php:80
  16 CRM\_Upgrade\_Incremental\_Base::runSql(Object(CRM\_Queue\_TaskContext), '4.7.alpha1') unknown:unknown
  17 call\_user\_func\_array(Array, Array) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Queue/Task.php:88
  18 CRM\_Queue\_Task->run(Object(CRM\_Queue\_TaskContext)) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Queue/Runner.php:214
  19 CRM\_Queue\_Runner->runNext(true) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
  20 CRM\_Queue\_Page\_AJAX::{closure}() /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
  21 CRM\_Queue\_ErrorPolicy->call(Object(Closure)) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
  22 CRM\_Queue\_Page\_AJAX::runNext() unknown:unknown
  23 call\_user\_func(Array) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:276
  24 CRM\_Core\_Invoke::runItem(Array) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:84
  25 CRM\_Core\_Invoke::\_invoke(Array) /var/www/joomla/administrator/components/com\_civicrm/civicrm/CRM/Core/Invoke.php:52
  26 CRM\_Core\_Invoke::invoke(Array) /var/www/joomla/administrator/components/com\_civicrm/civicrm.php:121
  27 civicrm\_invoke() /var/www/joomla/administrator/components/com\_civicrm/civicrm.php:40
  28 require\_once('/var/www/joomla/…') /var/www/joomla/libraries/cms/component/helper.php:405
  29 JComponentHelper::executeComponent('/var/www/joomla/…') /var/www/joomla/libraries/cms/component/helper.php:380
  30 JComponentHelper::renderComponent('com\_civicrm') /var/www/joomla/libraries/cms/application/administrator.php:98
  31 JApplicationAdministrator->dispatch() /var/www/joomla/libraries/cms/application/administrator.php:152
  32 JApplicationAdministrator->doExecute() /var/www/joomla/libraries/cms/application/cms.php:261
  33 JApplicationCms->execute() /var/www/joomla/administrator/index.php:51
  34 {main}
  
  Does anyone have an ideas how to resolve this ? I notice the multilingual errors. This has been installed on the server.
  
  Regards
  
  username_0
  
  **Tags:** upgrade, database
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-17. Score: 1
  
  Go to the **\civicrm\civicrm\CRM\Upgrade\4.7.alpha1.msg\_template** directory
  
  In **civicrm\_msg\_template.tpl** find the SQL statement that failed and that will indicate the problem.
  
  I had a similar situation where I was forced to upgrade from 4.4 to 4.7.7. I was forced to make corrections and continue the upgrade by commenting out code. Not a process I recommend, but I had no choice. Not recommended for an amateur coder.
  
  
  ---
  
  