Problem
The subtasks table in packages/shared/src/schema.sql (lines 99-106) has created_at but no updated_at column. All other tables (tasks, goals, lists) have both timestamps, making subtasks inconsistent.
Solution
- Add
updated_at TEXT DEFAULT (datetime('now')) column to subtasks table
- Add trigger to auto-update on changes:
CREATE TRIGGER IF NOT EXISTS trg_subtasks_updated_at
AFTER UPDATE ON subtasks
BEGIN
UPDATE subtasks SET updated_at = datetime('now') WHERE id = NEW.id;
END;
- Update shared types to include
updated_at on Subtask
Files
packages/shared/src/schema.sql — add column and trigger
packages/shared/src/index.ts — update Subtask type
Problem
The
subtaskstable inpackages/shared/src/schema.sql(lines 99-106) hascreated_atbut noupdated_atcolumn. All other tables (tasks, goals, lists) have both timestamps, making subtasks inconsistent.Solution
updated_at TEXT DEFAULT (datetime('now'))column to subtasks tableupdated_aton SubtaskFiles
packages/shared/src/schema.sql— add column and triggerpackages/shared/src/index.ts— update Subtask type