This commit is contained in:
seb
2026-10-12 18:01:25 +02:00
parent 2e961252f7
commit 88ff9e08a9
12 changed files with 104 additions and 27 deletions

View File

@@ -511,9 +511,11 @@ CREATE TABLE IF NOT EXISTS modelconversation (
created_at TEXT NOT NULL DEFAULT (${UTC_NOW}),
updated_at TEXT NOT NULL DEFAULT (${UTC_NOW}),
state TEXT NOT NULL DEFAULT 'idle' CHECK (state IN ('idle', 'busy')),
started_by INTEGER, -- id of the conversation that started this one as a subagent; deliberately NOT a foreign key
FOREIGN KEY (companyuser_id) REFERENCES companyuser(id) ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS IX_modelconversation_companyuser ON modelconversation (companyuser_id, updated_at);
CREATE INDEX IF NOT EXISTS IX_modelconversation_started_by ON modelconversation (started_by);
`;