aboutsummaryrefslogtreecommitdiff
path: root/mcp/senia/migrations/0002_tasks.sql
blob: 73f7820b1635592a520ed9a635466b8753ca486e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- Task tracking for agents.
-- Live tasks only; completed/cancelled tasks are deleted after their
-- lifecycle event is committed to memory (via diary_log).

CREATE TABLE tasks (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    owner TEXT NOT NULL CHECK (owner IN ('agent', 'user')),
    content TEXT NOT NULL,
    due_at TEXT,
    last_nudged_at TEXT,
    created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at TEXT,
    notes TEXT
);

CREATE INDEX idx_tasks_owner ON tasks(owner);