-- Jobs (chat/handoff.go, chat/jobs.go): a hand-off's title and how many
2
-- times the Assistant nudged it; a job card's hand-off and its one
3
-- sentence of detail; and each reply or nudge the Assistant made for a
4
-- job, once per key.
5
ALTER TABLE chat_handoffs ADD COLUMN title text;
6
ALTER TABLE chat_handoffs ADD COLUMN nudges integer NOT NULL DEFAULT 0;
7
ALTER TABLE chat_cards ADD COLUMN handoff_id text;
8
ALTER TABLE chat_cards ADD COLUMN detail text;
9
CREATE INDEX chat_card_handoff ON chat_cards(handoff_id);
10
CREATE TABLE chat_handoff_actions (ledger_key text PRIMARY KEY, handoff_id text NOT NULL, person text NOT NULL, kind text NOT NULL, context text, message_id text, result text, created_at datetime);
11
CREATE INDEX chat_handoff_action_handoff ON chat_handoff_actions(handoff_id);
12
CREATE INDEX chat_handoff_action_message ON chat_handoff_actions(message_id);