From 7019b6652b9f619a9e897987334cef1c94bf8af4 Mon Sep 17 00:00:00 2001
From: kevin Cristiano <kcristiano@kcristiano.com>
Date: Fri, 11 Mar 2022 10:30:39 -0500
Subject: [PATCH] Fully revert civicrm_event timestamp change

with smarty syntax fixed
---
 civicrm/CRM/Upgrade/Incremental/sql/5.47.1.mysql.tpl   |  7 +++++++
 .../CRM/Upgrade/Incremental/sql/5.47.alpha1.mysql.tpl  | 10 +---------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/civicrm/CRM/Upgrade/Incremental/sql/5.47.1.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/5.47.1.mysql.tpl
index 96826147b5..e8a3578094 100644
--- a/civicrm/CRM/Upgrade/Incremental/sql/5.47.1.mysql.tpl
+++ b/civicrm/CRM/Upgrade/Incremental/sql/5.47.1.mysql.tpl
@@ -5,3 +5,10 @@ DELETE FROM civicrm_navigation WHERE url='civicrm/report/list?compid=5&reset=1';
 
 DELETE FROM civicrm_managed WHERE module = "civigrant" AND entity_type = "OptionValue"
 AND name LIKE "OptionGroup_grant_type_%";
+
+{* Revert a90c3874d6ea74017dd038cc64d952afe99a1981 *}
+ALTER TABLE `civicrm_event`
+  MODIFY COLUMN `start_date` datetime NULL DEFAULT NULL COMMENT 'Date and time that event starts.',
+  MODIFY COLUMN `end_date` datetime NULL DEFAULT NULL COMMENT 'Date and time that event ends. May be NULL if no defined end date/time',
+  MODIFY COLUMN `registration_start_date` datetime NULL DEFAULT NULL COMMENT 'Date and time that online registration starts.',
+  MODIFY COLUMN `registration_end_date` datetime NULL DEFAULT NULL COMMENT 'Date and time that online registration ends.';
diff --git a/civicrm/CRM/Upgrade/Incremental/sql/5.47.alpha1.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/5.47.alpha1.mysql.tpl
index 3943ae4308..42b961de9c 100644
--- a/civicrm/CRM/Upgrade/Incremental/sql/5.47.alpha1.mysql.tpl
+++ b/civicrm/CRM/Upgrade/Incremental/sql/5.47.alpha1.mysql.tpl
@@ -17,15 +17,7 @@ ALTER TABLE `civicrm_navigation`
   MODIFY COLUMN `weight` int NOT NULL DEFAULT 0 COMMENT 'Ordering of the navigation items in various blocks.';
 
 {* https://lab.civicrm.org/dev/core/-/issues/2122 *}
-UPDATE `civicrm_event` SET `start_date` = NULL WHERE `start_date` < 19700102;
-UPDATE `civicrm_event` SET `end_date` = NULL WHERE `end_date` < 19700102;
-UPDATE `civicrm_event` SET `registration_start_date` = NULL WHERE `registration_start_date` < 19700102;
-UPDATE `civicrm_event` SET `registration_end_date` = NULL WHERE `registration_end_date` < 19700102;
-ALTER TABLE `civicrm_event`
-  MODIFY COLUMN `start_date` timestamp NULL DEFAULT NULL COMMENT 'Date and time that event starts.',
-  MODIFY COLUMN `end_date` timestamp NULL DEFAULT NULL COMMENT 'Date and time that event ends. May be NULL if no defined end date/time',
-  MODIFY COLUMN `registration_start_date` timestamp NULL DEFAULT NULL COMMENT 'Date and time that online registration starts.',
-  MODIFY COLUMN `registration_end_date` timestamp NULL DEFAULT NULL COMMENT 'Date and time that online registration ends.';
+{* removed civicrm_event schema changes *}
 
 {* Ensure CustomGroup.name is unique *}
 UPDATE civicrm_custom_group g1, civicrm_custom_group g2 SET g1.name = CONCAT(g1.name, '_1') WHERE g1.name = g2.name AND g1.id > g2.id;
-- 
GitLab