From 187c1972093c43c3f6348f0b0a0602fe67b8e17c Mon Sep 17 00:00:00 2001 From: git Date: Fri, 6 Jun 2025 14:05:16 +0100 Subject: [PATCH] Added a safety check @todo --- plt.php | 1 + 1 file changed, 1 insertion(+) diff --git a/plt.php b/plt.php index 1db9c99..5973ddc 100755 --- a/plt.php +++ b/plt.php @@ -11,6 +11,7 @@ function processAllTheActiveTables() { extract($activeTable); echo "Found Table : ".greenText($Name)."\n"; echo "Scanning all the rows in table $Name that need to be ran through trigger code:\n"; + // @todo: check if the table has a column called : LastUpdated. If try to auto-create it. (ALTER TABLE ... LastUpdated DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP) foreach(sql("SELECT * FROM $Name WHERE LastUpdated > '$LastUpdated'") as $unprocessedRow) { echo "Found row\n".json_encode($unprocessedRow)."\n"; $functionName = "handleNew".str_replace(".","__",$activeTable["Name"])."Row";