CRM/Upgrade - Add notice about snap_* and MySQL configuration
authorTim Otten <totten@civicrm.org>
Tue, 24 May 2022 01:55:44 +0000 (18:55 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 24 May 2022 05:15:10 +0000 (22:15 -0700)
CRM/Upgrade/Incremental/php/FiveFifty.php

index f140e01ab6dcc0574a5ac2be8d502c1f8b59e742..7d600df0de6a047ebb57700e89de547e6737a041 100644 (file)
  */
 class CRM_Upgrade_Incremental_php_FiveFifty extends CRM_Upgrade_Incremental_Base {
 
+  public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
+    parent::setPreUpgradeMessage($preUpgradeMessage, $rev, $currentVer);
+    if ($rev === '5.50.alpha1') {
+      $preUpgradeMessage = '<p>' . ts('To improve data-protection, CiviCRM (5.50+) may create snapshots of upgraded data ("snap_*" tables). The upgrader will automatically prune old snapshots. The "snap_*" tables should generally follow the same backup/replication rules as other MySQL tables, but advanced administrators may fine-tune per preference.') . '</p>'
+        . $preUpgradeMessage;
+      // The issue here is that most backup/replication rules are per-database (eg `mysqldump DB_NAME`), but some
+      // systems have special filters in their backup configuration (eg `civicrm_*` vs `civicrm_tmp_*` vs `log_civicrm_*`).
+      // We want to let these users know there's a change -- without scaring the regular users who don't have that.
+    }
+  }
+
   /**
    * Upgrade step; adds tasks including 'runSql'.
    *