From 0baf1134ea2d415aa55079ff98476afd0acf5811 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 14 Jul 2026 20:11:31 +0000 Subject: feat(tasks): add recurrence columns and model fields for native tasks recurrence_series_id != "" is the real recurring indicator (IsRecurring predates this feature and is never set). Adds parseWeekdays/formatWeekdays for the comma-separated weekday-list column, and threads the five new columns through scanNativeTasks and all four existing SELECT queries. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01VTUSAEKfsPc6WGDq45yPHD --- migrations/023_native_task_recurrence.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 migrations/023_native_task_recurrence.sql (limited to 'migrations/023_native_task_recurrence.sql') diff --git a/migrations/023_native_task_recurrence.sql b/migrations/023_native_task_recurrence.sql new file mode 100644 index 0000000..cc11324 --- /dev/null +++ b/migrations/023_native_task_recurrence.sql @@ -0,0 +1,10 @@ +-- Recurrence support for doot-native tasks: a recurring task generates a +-- brand-new row per iteration (see Store.CreateNextIteration), linked by +-- recurrence_series_id. recurrence_freq empty means "not recurring." +ALTER TABLE native_tasks ADD COLUMN recurrence_freq TEXT DEFAULT ''; +ALTER TABLE native_tasks ADD COLUMN recurrence_interval INTEGER DEFAULT 1; +ALTER TABLE native_tasks ADD COLUMN recurrence_weekdays TEXT DEFAULT ''; +ALTER TABLE native_tasks ADD COLUMN recurrence_series_id TEXT DEFAULT ''; +ALTER TABLE native_tasks ADD COLUMN next_occurrence_override TEXT DEFAULT ''; + +CREATE INDEX IF NOT EXISTS idx_native_tasks_recurrence_series ON native_tasks(recurrence_series_id); -- cgit v1.2.3