From 151e9d87e117b7980e6aad522ac8f3633eeca87a Mon Sep 17 00:00:00 2001
From: soryu <soryu@soryu.co>
Date: Mon, 2 Feb 2026 02:34:50 +0000
Subject: Make makima more opinionated and structured

---
 makima/migrations/20260202100000_add_contract_worktree.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 makima/migrations/20260202100000_add_contract_worktree.sql

(limited to 'makima/migrations/20260202100000_add_contract_worktree.sql')

diff --git a/makima/migrations/20260202100000_add_contract_worktree.sql b/makima/migrations/20260202100000_add_contract_worktree.sql
new file mode 100644
index 0000000..26c54ba
--- /dev/null
+++ b/makima/migrations/20260202100000_add_contract_worktree.sql
@@ -0,0 +1,13 @@
+-- Add worktree tracking to contracts
+-- Each contract now has a single worktree managed by a specific daemon
+
+ALTER TABLE contracts
+    ADD COLUMN worktree_path VARCHAR(512),
+    ADD COLUMN worktree_daemon_id UUID REFERENCES daemons(id),
+    ADD COLUMN worktree_base_branch VARCHAR(255),
+    ADD COLUMN worktree_branch VARCHAR(255);
+
+COMMENT ON COLUMN contracts.worktree_path IS 'Path to the worktree directory on the assigned daemon';
+COMMENT ON COLUMN contracts.worktree_daemon_id IS 'The daemon that owns/manages this contract worktree';
+COMMENT ON COLUMN contracts.worktree_base_branch IS 'The base branch the worktree was created from';
+COMMENT ON COLUMN contracts.worktree_branch IS 'The working branch in the worktree';
-- 
cgit v1.2.3

