From c89d9f9fba93e7b19efe0ee7c1dcc3b6f4e873e6 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 15 Apr 2021 11:28:55 +1000 Subject: [PATCH] dev/core#2528 Set Modified date to be current timestamp in civicrm_contribution_recur if it is null before setting the field to NOT NULL --- CRM/Upgrade/Incremental/php/FiveThirtySeven.php | 1 + 1 file changed, 1 insertion(+) diff --git a/CRM/Upgrade/Incremental/php/FiveThirtySeven.php b/CRM/Upgrade/Incremental/php/FiveThirtySeven.php index cc11c3bd26..f87d2effe6 100644 --- a/CRM/Upgrade/Incremental/php/FiveThirtySeven.php +++ b/CRM/Upgrade/Incremental/php/FiveThirtySeven.php @@ -129,6 +129,7 @@ class CRM_Upgrade_Incremental_php_FiveThirtySeven extends CRM_Upgrade_Incrementa */ public static function updateDBDefaultsForContributionRecur(CRM_Queue_TaskContext $ctx): bool { $pendingID = CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_ContributionRecur', 'contribution_status_id', 'Pending'); + CRM_Core_DAO::executeQuery("UPDATE `civicrm_contribution_recur` SET `modified_date` = CURRENT_TIMESTAMP() WHERE `modified_date` IS NULL"); CRM_Core_DAO::executeQuery(" ALTER TABLE `civicrm_contribution_recur` MODIFY COLUMN `start_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The date the first scheduled recurring contribution occurs.', -- 2.25.1