diff options
| author | soryu <soryu@soryu.co> | 2026-01-21 16:08:51 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-21 16:08:51 +0000 |
| commit | 3bbb7ac92f0a480f9275c9b29b6a4e07e8e0ff45 (patch) | |
| tree | 69773eed3e2005ded5991a0e75786965e1c4a6d7 | |
| parent | c6c69af39b29276920b07e0d220f7016335f1019 (diff) | |
| download | soryu-3bbb7ac92f0a480f9275c9b29b6a4e07e8e0ff45.tar.gz soryu-3bbb7ac92f0a480f9275c9b29b6a4e07e8e0ff45.zip | |
Add migration for branched_from_task_id column
Add database migration to support task branching feature:
- Add branched_from_task_id UUID column to tasks table
- Create index for efficient lookups
- FK constraint with ON DELETE SET NULL for referential integrity
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
| -rw-r--r-- | makima/migrations/20250121000000_add_branched_from.sql | 10 |
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'; |
