Upgrading from CiviCRM 1.9 to 2.0

CiviCRM is a major new release. It makes important changes to the database.

Database Error Code: Illegal mix of collations (utf8_general_ci,IMPLICIT) 
and (utf8_unicode_ci,IMPLICIT) for operation '=', 1267

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => UPDATE civicrm_activity ca
LEFT JOIN civicrm_option_value ov ON (ov.option_group_id = @og_id_as AND ov.label = ca.status)
SET    ca.status_id = ov.value [nativecode=1267 ** Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=']
    [type] => DB_Error
    [user_info] => UPDATE civicrm_activity ca
LEFT JOIN civicrm_option_value ov ON (ov.option_group_id = @og_id_as AND ov.label = ca.status)
SET    ca.status_id = ov.value [nativecode=1267 ** Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=']
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE civicrm_activity ca
LEFT JOIN civicrm_option_value ov ON (ov.option_group_id = @og_id_as AND ov.label = ca.status)
SET    ca.status_id = ov.value [nativecode=1267 ** Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=']"]
)

Upgrading from CiviCRM 2.0 to 2.1

Upgrading from CiviCRM 3.0 to 3.3

ALTER TABLE civicrm_domain 
ADD `locale_custom_strings` text COLLATE utf8_unicode_ci 
COMMENT 'String Overrides';


CategoryInstallWebApps

Bout de code perdu (à replacer?) :

INSERT INTO civicrm_option_value 
  (option_group_id, 
  label_en_US, 
  label_fr_FR, 
  description_en_US, 
  description_fr_FR, 
  value, 
  name, 
  weight, 
  filter, 
  is_reserved) 
VALUES (
  @option_group_id_activity_type, 
 'Inbound Email', 
 'Inbound Email', 
 'Inbound Email.', 
 'Inbound Email.',              
  (SELECT 
    @max_val := @max_val+1), 
   'Inbound Email',       
   (SELECT @max_wt := @max_wt+1), 
  1, 
  1)

Mise à jour de 3.x à 4.1.x

Avec Aegir et provision-civicrm, éventuellement, tout devrait être automatique. Pour l'instant voici une procédure manuelle en cas de problème :

Problème lors de la mise à jour de la base de données

Le script plante en cours de mise à jour et vous obtenez un message d'erreur du genre :

Drush command terminated abnormally due to an unrecoverable error.                                                                                 [error]
<p>backTrace</p><p><pre>/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 146
, handle, 
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 931
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 968
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 564
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/CRM/Utils/File.php, query, 274
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/CRM/Upgrade/Form.php, sourceSQLFile, 155
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/CRM/Upgrade/Form.php, source, 297
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/CRM/Upgrade/Form.php, processLocales, 323
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FourOne.php, processSQL, 76
/srv/aegir/platforms/civicrm-d6-4.1.3-build-2012.07.05-production/sites/all/modules/civicrm/CRM/Upgrade/Page/Upgrade.php, upgrade_4_1_alpha1, 290

Une façon de trouver le problème :

Tester la mise à jour manuelle dans le contexte Aegir

CiviCrm/Upgrading (last edited 2018-05-19 01:28:39 by anonymous)