From 715be44075f0d2a08f2888e2b2b51adcd514a649 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 21 Jul 2022 15:44:16 -0700 Subject: [PATCH] FiveFiftyTwo - Add snapshots for modified data structures --- CRM/Upgrade/Incremental/php/FiveFiftyTwo.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CRM/Upgrade/Incremental/php/FiveFiftyTwo.php b/CRM/Upgrade/Incremental/php/FiveFiftyTwo.php index 7c29e2f62b..c1ff0badc3 100644 --- a/CRM/Upgrade/Incremental/php/FiveFiftyTwo.php +++ b/CRM/Upgrade/Incremental/php/FiveFiftyTwo.php @@ -28,6 +28,14 @@ class CRM_Upgrade_Incremental_php_FiveFiftyTwo extends CRM_Upgrade_Incremental_B * The version number matching this function name */ public function upgrade_5_52_alpha1($rev): void { + $this->addSnapshotTask('contribution', CRM_Utils_SQL_Select::from('civicrm_contribution') + ->where('(contribution_recur_id IS NOT NULL) or (is_template = 1)') + ->select(['id', 'contribution_recur_id', 'is_template', 'total_amount']) + ); + $this->addSnapshotTask('contribution_recur', CRM_Utils_SQL_Select::from('civicrm_contribution_recur') + ->select(['id', 'amount', 'modified_date']) + ); + $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev); } -- 2.25.1