From 69947d5f84823cf9c412be3bfd91535125d96134 Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:33:31 +0100 Subject: [PATCH] sqlite: Enforce that occurences in calendarobjects are processable by date() --- crates/store_sqlite/src/calendar_store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/store_sqlite/src/calendar_store.rs b/crates/store_sqlite/src/calendar_store.rs index 277a6ec..3ff4d60 100644 --- a/crates/store_sqlite/src/calendar_store.rs +++ b/crates/store_sqlite/src/calendar_store.rs @@ -337,7 +337,7 @@ impl SqliteCalendarStore { (if overwrite { sqlx::query!( - "REPLACE INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", + "REPLACE INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, date(?), date(?), ?, ?)", principal, cal_id, object_id, @@ -350,7 +350,7 @@ impl SqliteCalendarStore { } else { // If the object already exists a database error is thrown and handled in error.rs sqlx::query!( - "INSERT INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", + "INSERT INTO calendarobjects (principal, cal_id, id, ics, first_occurence, last_occurence, etag, object_type) VALUES (?, ?, ?, ?, date(?), date(?), ?, ?)", principal, cal_id, object_id,