Answers.Body: <p><strong>On a fresh install, this should not be required.</strong> The reply below is suitable for a site which is seeing this error during an expected upgrade.</p>
  
  <hr>
  
  <p>In <code>CRM/Upgrade/Incremental/php/FourFive.php</code> (or an included .sql file from there) is an instruction to add a new column to <code>civicrm_uf_join</code></p>
  
  <p>Your DB already contains this column, so CiviCRM runs into trouble when it tries to add it again.</p>
  
  <p>Go back to as pristine a copy of the 4.4 DB as you can, and ensure that column (<code>civicrm_uf_join.module_data</code>) does not exist, removing it if it does. Then, re-run the upgrader.</p>
  
  <p>Running upgrades twice on a DB will lead to these sorts of errors, but sometimes applying a patch on a site before upgrade will mean that your DB changes are already applied and need to be eliminated from the following upgrade.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-06T05:05:51.013Z
Answers.Text: This is very helpful - thank you. I'm perplexed as to why a brand new installation of 4.6.4 thought it had a 4.4.6 database. Anyway, what I have done in the meantime is to uninstall 4.6.4 and install 4.4.16 instead. When I'm feeling brave - or foolhardy! - I'll try upgrading...
Answers.UserDisplayName: David Stone
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-06T05:09:38.327Z
Answers.Text: Looking again at your description - I wonder if somehow your CiviCRM has a typo in the `civicrm_domain` table, reporting 4.4.6 instead of 4.6.4. That would be unfortunate, but it seems plausible. Could someone have directly edited the DB?
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-06T12:54:12.433Z
Answers.Text: Yes, I agree, a typo seems plausible. But no-one at this end would have edited the database directly. Is it an error in the original download that no-one has noticed? Can I be the only person who has tried to install 4.6.4 into the WordPress environment?!
Answers.UserDisplayName: David Stone
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-05T21:58:54.290Z
Answers.LastActivityDate: 2015-07-07T02:24:47.320Z
Answers.LastEditDate: 2015-07-07T02:24:47.320Z
Answers.UserDisplayName: Chris Burgess
Answers.Body: <p>Since this is a brand-new install, there is no need to run upgrades, and attempting to upgrade a 4.6.4 site as if it were 4.4.6 is going to cause errors as you observed.</p>
  
  <p>You could fix this by editing your civicrm_domain sql table to contain the correct version number (look for "4.4.6" and change it to 4.6.4").</p>
  
  <p>As for what caused the problem, it's a mystery to me.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-07T01:20:49.877Z
Answers.LastActivityDate: 2015-07-07T01:20:49.877Z
Answers.UserDisplayName: Coleman
Body: <p>I've installed CiviCRM 4.6.4 on my WordPress site. But on admin.php page, I get a message box warning me that "New codebase version detected. You might want to visit upgrade screen to upgrade the database."</p>
  
  <p>I visit the upgrade screen which invites me to "Use this utility to upgrade your CiviCRM database from 4.4.6 to 4.6.4."</p>
  
  <p>Doing this produces a series of error messages and corrupts the database:</p>
  
  <pre><code>[Error: Migrate honoree information to module_data]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    ALTER TABLE `civicrm_uf_join` ADD COLUMN `module_data` longtext COMMENT 'Json serialized array of data used by the ufjoin.module' [nativecode=1060 ** Duplicate column name 'module_data']
  DebugInfo   ALTER TABLE `civicrm_uf_join` ADD COLUMN `module_data` longtext COMMENT 'Json serialized array of data used by the ufjoin.module' [nativecode=1060 ** Duplicate column name 'module_data']
  PEAR_Exception: DB Error: unknown error in unknown on line unknown
  - DB_Error: DB Error: unknown error in unknown on line unknown
  </code></pre>
  
  <p>Exception trace</p>
  
  <pre><code>#   Function    Location
  0   CRM_Core_Error::exceptionHandler(Object(DB_Error))  unknown:unknown
  1   call_user_func(Array, Object(DB_Error)) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:931
  2   PEAR_Error-&gt;PEAR_Error('DB Error: unknow…', -1, 16, Array, 'ALTER TABLE `civ…') /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB.php:976
  3   DB_Error-&gt;DB_Error(-1, 16, Array, 'ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:564
  4   PEAR-&gt;raiseError(null, -1, null, null, 'ALTER TABLE `civ…', 'DB_Error', true)   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1905
  5   DB_common-&gt;raiseError(-1, null, null, null, '1060 ** Duplicat…')    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:899
  6   DB_mysql-&gt;mysqlRaiseError() /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:328
  7   DB_mysql-&gt;simpleQuery('ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1216
  8   DB_common-&gt;query('ALTER TABLE `civ…')   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:2442
  9   DB_DataObject-&gt;_query('ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:1634
  10  DB_DataObject-&gt;query('ALTER TABLE `civ…')   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:325
  11  CRM_Core_DAO-&gt;query('ALTER TABLE `civ…', true)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1179
  12  CRM_Core_DAO::executeQuery('ALTER TABLE `civ…') /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/php/FourFive.php:265
  13  CRM_Upgrade_Incremental_php_FourFive::migrateHonoreeInfo(Object(CRM_Queue_TaskContext)) unknown:unknown
  14  call_user_func_array(Array, Array)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php:88
  15  CRM_Queue_Task-&gt;run(Object(CRM_Queue_TaskContext))  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php:213
  16  CRM_Queue_Runner-&gt;runNext(true) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
  17  CRM_Queue_Page_AJAX::{closure}()    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
  18  CRM_Queue_ErrorPolicy-&gt;call(Object(Closure))    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
  19  CRM_Queue_Page_AJAX::runNext()  unknown:unknown
  20  call_user_func(Array)   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:278
  21  CRM_Core_Invoke::runItem(Array) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:86
  22  CRM_Core_Invoke::_invoke(Array) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:54
  23  CRM_Core_Invoke::invoke(Array)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm.php:1189
  24  CiviCRM_For_WordPress-&gt;invoke('')   unknown:unknown
  25  call_user_func_array(Array, Array)  /home/coventry/public_html/wpsite/wp-includes/plugin.php:496
  26  do_action('toplevel_page_Ci…')  /home/coventry/public_html/wpsite/wp-admin/admin.php:226
  27  {main}
  </code></pre>
  
  <p>Can anyone point me in the direction of working out what's going on?</p>
  
  <p>Many thanks,</p>
  
  <p>David</p>
  
Tags: <wordpress><upgrade>
Title: New codebase version detected
ThreadText: # New codebase version detected
  
  (Asked by: username_0 on 2015-07-05)
  
  I've installed CiviCRM 4.6.4 on my WordPress site. But on admin.php page, I get a message box warning me that "New codebase version detected. You might want to visit upgrade screen to upgrade the database."
  I visit the upgrade screen which invites me to "Use this utility to upgrade your CiviCRM database from 4.4.6 to 4.6.4."
  Doing this produces a series of error messages and corrupts the database:
  [Error: Migrate honoree information to module_data]
  Error Field Error Value
  Type    DB_Error
  Code    -1
  Message DB Error: unknown error
  Mode    16
  UserInfo    ALTER TABLE `civicrm_uf_join` ADD COLUMN `module_data` longtext COMMENT 'Json serialized array of data used by the ufjoin.module' [nativecode=1060 ** Duplicate column name 'module_data']
  DebugInfo   ALTER TABLE `civicrm_uf_join` ADD COLUMN `module_data` longtext COMMENT 'Json serialized array of data used by the ufjoin.module' [nativecode=1060 ** Duplicate column name 'module_data']
  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)) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:931
  2   PEAR_Error->PEAR_Error('DB Error: unknow…', -1, 16, Array, 'ALTER TABLE `civ…') /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB.php:976
  3   DB_Error->DB_Error(-1, 16, Array, 'ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:564
  4   PEAR->raiseError(null, -1, null, null, 'ALTER TABLE `civ…', 'DB_Error', true)   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1905
  5   DB_common->raiseError(-1, null, null, null, '1060 ** Duplicat…')    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:899
  6   DB_mysql->mysqlRaiseError() /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php:328
  7   DB_mysql->simpleQuery('ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php:1216
  8   DB_common->query('ALTER TABLE `civ…')   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:2442
  9   DB_DataObject->_query('ALTER TABLE `civ…')  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php:1634
  10  DB_DataObject->query('ALTER TABLE `civ…')   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:325
  11  CRM_Core_DAO->query('ALTER TABLE `civ…', true)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1179
  12  CRM_Core_DAO::executeQuery('ALTER TABLE `civ…') /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Upgrade/Incremental/php/FourFive.php:265
  13  CRM_Upgrade_Incremental_php_FourFive::migrateHonoreeInfo(Object(CRM_Queue_TaskContext)) unknown:unknown
  14  call_user_func_array(Array, Array)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Task.php:88
  15  CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Runner.php:213
  16  CRM_Queue_Runner->runNext(true) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:52
  17  CRM_Queue_Page_AJAX::{closure}()    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/ErrorPolicy.php:106
  18  CRM_Queue_ErrorPolicy->call(Object(Closure))    /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Queue/Page/AJAX.php:54
  19  CRM_Queue_Page_AJAX::runNext()  unknown:unknown
  20  call_user_func(Array)   /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:278
  21  CRM_Core_Invoke::runItem(Array) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:86
  22  CRM_Core_Invoke::_invoke(Array) /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:54
  23  CRM_Core_Invoke::invoke(Array)  /home/coventry/public_html/wpsite/wp-content/plugins/civicrm/civicrm.php:1189
  24  CiviCRM_For_WordPress->invoke('')   unknown:unknown
  25  call_user_func_array(Array, Array)  /home/coventry/public_html/wpsite/wp-includes/plugin.php:496
  26  do_action('toplevel_page_Ci…')  /home/coventry/public_html/wpsite/wp-admin/admin.php:226
  27  {main}
  
  Can anyone point me in the direction of working out what's going on?
  Many thanks,
  David
  
  **Tags:** wordpress, upgrade
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-07-05. Score: 3
  
  **On a fresh install, this should not be required.** The reply below is suitable for a site which is seeing this error during an expected upgrade.
  
  ---
  
  In `CRM/Upgrade/Incremental/php/FourFive.php` (or an included .sql file from there) is an instruction to add a new column to `civicrm_uf_join`
  
  Your DB already contains this column, so CiviCRM runs into trouble when it tries to add it again.
  
  Go back to as pristine a copy of the 4.4 DB as you can, and ensure that column (`civicrm_uf_join.module_data`) does not exist, removing it if it does. Then, re-run the upgrader.
  
  Running upgrades twice on a DB will lead to these sorts of errors, but sometimes applying a patch on a site before upgrade will mean that your DB changes are already applied and need to be eliminated from the following upgrade.
  
  > **Comments:**
  > **username_0**: This is very helpful - thank you. I'm perplexed as to why a brand new installation of 4.6.4 thought it had a 4.4.6 database. Anyway, what I have done in the meantime is to uninstall 4.6.4 and install 4.4.16 instead. When I'm feeling brave - or foolhardy! - I'll try upgrading...  
  > **username_1**: Looking again at your description - I wonder if somehow your CiviCRM has a typo in the `civicrm_domain` table, reporting 4.4.6 instead of 4.6.4. That would be unfortunate, but it seems plausible. Could someone have directly edited the DB?  
  > **username_0**: Yes, I agree, a typo seems plausible. But no-one at this end would have edited the database directly. Is it an error in the original download that no-one has noticed? Can I be the only person who has tried to install 4.6.4 into the WordPress environment?!  
  
  ---
  
  ### Answer by username_2 on 2015-07-07. Score: 1
  
  Since this is a brand-new install, there is no need to run upgrades, and attempting to upgrade a 4.6.4 site as if it were 4.4.6 is going to cause errors as you observed.
  
  You could fix this by editing your civicrm\_domain sql table to contain the correct version number (look for "4.4.6" and change it to 4.6.4").
  
  As for what caused the problem, it's a mystery to me.
  
  
  ---
  
  