On digging I determined this trigger hokiness was all about mysql
5.5 and we can ditch it now
https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-5.html#mysqld-5-6-5-data-types
and https://github.com/civicrm/civicrm-core/pull/10953#issuecomment-
327613771
Note that we still support mysql 5.6 and the current version is 5.6.51
I think it's fine to require that the 5.6 minimum is 5.6.5 as released in 2012
I'll do the upgrade script as a follow up
*
* Generated from xml/schema/CRM/Mailing/Mailing.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:a2d71da677efc3436ae8ed9414cdecca)
+ * (GenCodeChecksum:4c28acf96d01fa990a3af7f2d72344b5)
*/
/**
'description' => ts('Date and time this mailing was created.'),
'required' => FALSE,
'where' => 'civicrm_mailing.created_date',
- 'default' => 'NULL',
+ 'default' => 'CURRENT_TIMESTAMP',
'table_name' => 'civicrm_mailing',
'entity' => 'Mailing',
'bao' => 'CRM_Mailing_BAO_Mailing',
WHERE value = 'civicrm_case' AND option_group_id = @option_group_id_tuf;
UPDATE civicrm_option_value SET name = 'File'
WHERE value = 'civicrm_file' AND option_group_id = @option_group_id_tuf;
+
+ALTER TABLE civicrm_mailing
+MODIFY COLUMN `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date and time this mailing was created.';
$container->setDefinition('cache_config', new Definition('ArrayObject'))
->setFactory([new Reference(self::SELF), 'createCacheConfig'])->setPublic(TRUE);
- $container->setDefinition('civi.mailing.triggers', new Definition(
- 'Civi\Core\SqlTrigger\TimestampTriggers',
- ['civicrm_mailing', 'Mailing']
- ))->addTag('kernel.event_listener', ['event' => 'hook_civicrm_triggerInfo', 'method' => 'onTriggerInfo'])->setPublic(TRUE);
-
$container->setDefinition('civi.activity.triggers', new Definition(
'Civi\Core\SqlTrigger\TimestampTriggers',
['civicrm_activity', 'Activity']
<field>
<name>created_date</name>
<type>timestamp</type>
- <default>NULL</default>
+ <default>CURRENT_TIMESTAMP</default>
<required>false</required>
<title>Mailing Created Date</title>
<comment>Date and time this mailing was created.</comment>