diff options
| author | soryu <soryu@soryu.co> | 2026-01-29 02:30:16 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-29 02:30:16 +0000 |
| commit | 7af8561677cfdcfd23d099a25783c7fef51d1ba6 (patch) | |
| tree | a15cddfa7e5492c3d883419e60a1dad3c9d2d0f3 /makima/migrations | |
| parent | cfe3ea0aae878ae8f591acdc33a48332ac875b9e (diff) | |
| download | soryu-7af8561677cfdcfd23d099a25783c7fef51d1ba6.tar.gz soryu-7af8561677cfdcfd23d099a25783c7fef51d1ba6.zip | |
Fix worktree cleanup to not run for shared worktrees
Diffstat (limited to 'makima/migrations')
| -rw-r--r-- | makima/migrations/20260129000000_add_supervisor_worktree_task_id.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/makima/migrations/20260129000000_add_supervisor_worktree_task_id.sql b/makima/migrations/20260129000000_add_supervisor_worktree_task_id.sql new file mode 100644 index 0000000..974644c --- /dev/null +++ b/makima/migrations/20260129000000_add_supervisor_worktree_task_id.sql @@ -0,0 +1,7 @@ +-- Add supervisor_worktree_task_id column to tasks table. +-- When set, indicates this task shares the worktree of the specified supervisor task +-- and should NOT have its worktree deleted during cleanup (the supervisor owns the worktree). +ALTER TABLE tasks ADD COLUMN supervisor_worktree_task_id UUID REFERENCES tasks(id) ON DELETE SET NULL; + +-- Create index for efficient lookups +CREATE INDEX idx_tasks_supervisor_worktree_task_id ON tasks(supervisor_worktree_task_id) WHERE supervisor_worktree_task_id IS NOT NULL; |
