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.
This commit is contained in:
themodrnhakr 2025-09-29 21:13:26 -05:00
parent eddaf02824
commit 2962c3aace

View File

@ -30,8 +30,8 @@ export const tasks = sqliteTable("tasks", {
description: text("description"), description: text("description"),
type: int("type").references(() => taskTypes.id), type: int("type").references(() => taskTypes.id),
subtype: text("subtype"), subtype: text("subtype"),
openDate: text("open_date").$type<Date["toISOString"]>(), openDate: int("open_date", { mode: "timestamp" }),
closeDate: text("close_date").$type<Date["toISOString"]>(), closeDate: int("close_date", { mode: "timestamp" }),
status: text("status"), status: text("status"),
priority: text("priority"), priority: text("priority"),
parent: int("parent").references((): AnySQLiteColumn => tasks.id), parent: int("parent").references((): AnySQLiteColumn => tasks.id),