From 91c6086896dcbebb18a0375e4c4052922d0d21df Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 13 Sep 2022 15:05:26 -0700 Subject: [PATCH] sqlite: use delete for truncate --- lib/Db/TimelineWrite.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Db/TimelineWrite.php b/lib/Db/TimelineWrite.php index 9aad8114..3baaa083 100644 --- a/lib/Db/TimelineWrite.php +++ b/lib/Db/TimelineWrite.php @@ -141,7 +141,8 @@ class TimelineWrite { * @param File $file */ public function clear() { - $sql = 'TRUNCATE TABLE *PREFIX*memories'; - $this->connection->executeStatement($sql); + $query = $this->connection->getQueryBuilder(); + $query->delete('memories'); + $query->executeStatement(); } } \ No newline at end of file