summaryrefslogtreecommitdiff
path: root/makima/migrations/20250121000000_add_branched_from.sql
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-21 17:31:46 +0000
committerGitHub <noreply@github.com>2026-01-21 17:31:46 +0000
commit94e5604e770d6589f786ea71e51738e21492f301 (patch)
tree6c9b0f32a8d77464bc1a5131ba0828d252851abc /makima/migrations/20250121000000_add_branched_from.sql
parentda246c4c4e23c9ad976705f9a3fa80e0d75b4425 (diff)
downloadsoryu-94e5604e770d6589f786ea71e51738e21492f301.tar.gz
soryu-94e5604e770d6589f786ea71e51738e21492f301.zip
Add task branching feature (#15)
Diffstat (limited to 'makima/migrations/20250121000000_add_branched_from.sql')
-rw-r--r--makima/migrations/20250121000000_add_branched_from.sql10
1 files changed, 10 insertions, 0 deletions
diff --git a/makima/migrations/20250121000000_add_branched_from.sql b/makima/migrations/20250121000000_add_branched_from.sql
new file mode 100644
index 0000000..bbb395b
--- /dev/null
+++ b/makima/migrations/20250121000000_add_branched_from.sql
@@ -0,0 +1,10 @@
+-- Add branched_from_task_id column to tasks table for task branching support.
+-- This allows creating new tasks that branch from an existing task's conversation,
+-- enabling "what if" exploration of different approaches from the same starting point.
+
+ALTER TABLE tasks
+ADD COLUMN IF NOT EXISTS branched_from_task_id UUID REFERENCES tasks(id) ON DELETE SET NULL;
+
+CREATE INDEX IF NOT EXISTS idx_tasks_branched_from ON tasks(branched_from_task_id);
+
+COMMENT ON COLUMN tasks.branched_from_task_id IS 'Source task ID when this task was branched from another task conversation';