瀏覽代碼

fix CleanDb job

Olivier Massot 1 年之前
父節點
當前提交
a0791bd2ae
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Service/Cron/Job/CleanDb.php

+ 1 - 1
src/Service/Cron/Job/CleanDb.php

@@ -146,7 +146,7 @@ class CleanDb extends BaseCronJob implements CronjobInterface
 
         $sql = 'DELETE
                 FROM opentalent.Message
-                where (m.dateSent < :maxDate or (m.dateSent is null and m.createDate < :maxDate)) and isSystem = true and id > 0;';
+                where (dateSent < :maxDate or (dateSent is null and createDate < :maxDate)) and isSystem = true and id > 0;';
 
         $stmt = $this->connection->prepare($sql);
         $purgedMessage = $stmt->executeStatement(['maxDate' => $maxDate->format('c')]);