From 2962c3aacea0e77dd3ad80dc3f13688c51d6b1f0 Mon Sep 17 00:00:00 2001 From: themodrnhakr Date: Mon, 29 Sep 2025 21:13:26 -0500 Subject: [PATCH] Change tasks schema. Existing date fields in the tasks table have been changed from TEXT to INTEGER with mode set to timestamp. This will simplify date storage. There were a number of issues encountered with storing dates as typed strings. --- src/lib/server/db/schema/tasks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/server/db/schema/tasks.ts b/src/lib/server/db/schema/tasks.ts index ea2e3f6..b22adc1 100644 --- a/src/lib/server/db/schema/tasks.ts +++ b/src/lib/server/db/schema/tasks.ts @@ -30,8 +30,8 @@ export const tasks = sqliteTable("tasks", { description: text("description"), type: int("type").references(() => taskTypes.id), subtype: text("subtype"), - openDate: text("open_date").$type(), - closeDate: text("close_date").$type(), + openDate: int("open_date", { mode: "timestamp" }), + closeDate: int("close_date", { mode: "timestamp" }), status: text("status"), priority: text("priority"), parent: int("parent").references((): AnySQLiteColumn => tasks.id),