civicrm / org.civicrm.doctorwhen

Doctor When: Temporal cleanup agent
Other
2 stars 9 forks source link

Timestamp conversion fails on MySQL 5.7 #5

Closed MegaphoneJon closed 6 years ago

MegaphoneJon commented 7 years ago

By default, MySQL 5.7's SQL modes include "NO_ZERO_DATE" and "NO_ZERO_IN_DATE". When these SQL modes are set, CRM_DoctorWhen_Cleanups_ConvertTimestamp->enqueue() doesn't specify valid default values when $this->default is null.

This leads to this error on objects where $this->default is null: ERROR 1067 (42000): Invalid default value for 'expired_date'.

totten commented 7 years ago

Related question on Mattermost: https://chat.civicrm.org/civicrm/pl/wm59uhmrojrsjfzowii6e79r8w

seamuslee001 commented 7 years ago

I believe that the combination of https://github.com/civicrm/org.civicrm.doctorwhen/pull/6 and https://github.com/civicrm/civicrm-core/pull/11129 will fix the conversion