summaryrefslogtreecommitdiff
path: root/migrations/023_native_task_recurrence.sql
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/023_native_task_recurrence.sql')
-rw-r--r--migrations/023_native_task_recurrence.sql10
1 files changed, 10 insertions, 0 deletions
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);