1

CiviCRM is currently running on version 5.42.1. I wanted to upgrade to 5.45.0 but here the upgrade script fails with following message:

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

[code] => -19
[message] => DB Error: no such field
[mode] => 16
[debug_info] => UPDATE  `civicrm_managed`  SET `module` = 'nz.co.fuzion.extendedreport' , `name` = 'Extended Report - Editable Activities' , `entity_type` =
'ReportTemplate' , `entity_id` = 1099 , `entity_modified_date` = NULL   WHERE (  `civicrm_managed`.`id` = 54 )   [nativecode=1054 ** Unknown column 'entity_modified_date' in
'field list']
    [type] => DB_Error
    [user_info] => UPDATE  `civicrm_managed`  SET `module` = 'nz.co.fuzion.extendedreport' , `name` = 'Extended Report - Editable Activities' , `entity_type` = 'ReportTemplate'
    , `entity_id` = 1099 , `entity_modified_date` = NULL   WHERE (  `civicrm_managed`.`id` = 54 )   [nativecode=1054 ** Unknown column 'entity_modified_date' in 'field list']
        [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="UPDATE  `civicrm_managed`  SET
    `module` = 'nz.co.fuzion.extendedreport' , `name` = 'Extended Report - Editable Activities' , `entity_type` = 'ReportTemplate' , `entity_id` = 1099 , `entity_modified_date` =
    NULL   WHERE (  `civicrm_managed`.`id` = 54 )   [nativecode=1054 ** Unknown column 'entity_modified_date' in 'field list']"]

I found out that this field is added in CRM_Upgrade_Incremental_php_FiveFortyFive->upgrade_5_45_alpha1() (as far as I understand). May this be a conflict with the order of creating the field in table and updating the data in table later on?

By now only content from Extended Report plugin is in this civicrm_managed table. I don't know what the purpose of this table is in general but maybe this is the reason why this issue did not appear for others but for me as I have this more or less exotic plugin installed?!

1 Answer 1

2

I think this may be a bug in the CiviCRM update process. It is trying to add the entity_modified_date before this column is created.

I've raised an issue in https://lab.civicrm.org/dev/core/-/issues/3045

A patch is available which fixed the issue for me. You could try applying this to your site to see if that works for you too.

Alternatively, you could try upgrading to CiviCRM 5.44 then upgrading to CiviCRM 5.45 (this also solved the issue for me).

2
  • 1
    It actually helped to do the update to 5.44.0 first and after that the update to 5.45. Thank you!!! Feb 2 at 14:05
  • @TobiasKrause I'm glad that helped! Feb 2 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.