mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
sqlite_store: Drop timezone column in favour of timezone_id
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE calendars ADD COLUMN timezone TEXT;
|
||||
@@ -0,0 +1,3 @@
|
||||
-- We don't want to save timezones as ics anymore
|
||||
-- but instead just rely on the TZDB identifier
|
||||
ALTER TABLE calendars DROP COLUMN timezone;
|
||||
@@ -98,7 +98,7 @@ impl SqliteCalendarStore {
|
||||
) -> Result<Calendar, Error> {
|
||||
let cal = sqlx::query_as!(
|
||||
CalendarRow,
|
||||
r#"SELECT principal, id, displayname, "order", description, color, timezone_id, deleted_at, synctoken, subscription_url, push_topic, comp_event, comp_todo, comp_journal
|
||||
r#"SELECT *
|
||||
FROM calendars
|
||||
WHERE (principal, id) = (?, ?)
|
||||
AND ((deleted_at IS NULL) OR ?) "#,
|
||||
@@ -118,7 +118,7 @@ impl SqliteCalendarStore {
|
||||
) -> Result<Vec<Calendar>, Error> {
|
||||
let cals = sqlx::query_as!(
|
||||
CalendarRow,
|
||||
r#"SELECT principal, id, displayname, "order", description, color, timezone_id, deleted_at, synctoken, subscription_url, push_topic, comp_event, comp_todo, comp_journal
|
||||
r#"SELECT *
|
||||
FROM calendars
|
||||
WHERE principal = ? AND deleted_at IS NULL"#,
|
||||
principal
|
||||
|
||||
Reference in New Issue
Block a user