aboutsummaryrefslogtreecommitdiff
path: root/mcp/senia/migrations/0001_initial.sql
blob: e560e10d8bef5cb5c1d91375ba768c17edb1a71d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- Initial schema for senia.db.
-- Single shared database for all senia-related state.
-- Currently: diary_logs only. Future tables (tasks, embeddings, etc.) added via new migrations.

CREATE TABLE diary_logs (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    ts TEXT NOT NULL,                    -- ISO 8601 UTC with offset
    content TEXT NOT NULL,               -- 1-2 sentence observation
    created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX idx_diary_ts ON diary_logs(ts);