1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SQLite format 3 @ $ .��
� R ��Wj�;
�
�� l���7�R� � � � � r11�table_fts5_probe_config_fts5_probe_configCREATE TABLE '_fts5_probe_config'(k PRIMARY KEY, v) WITHOUT ROWIDv33�table_fts5_probe_docsize_fts5_probe_docsizeCREATE TABLE '_fts5_probe_docsize'(id INTEGER PRIMARY KEY, sz BLOB)q33� table_fts5_probe_content_fts5_probe_contentCREATE TABLE '_fts5_probe_content'(id INTEGER PRIMARY KEY, c0)�Q++�?table_fts5_probe_idx_fts5_probe_idxCREATE TABLE '_fts5_probe_idx'(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID� �--�table_fts5_probe_data_fts5_probe_dataCREATE TABLE '_fts5_probe_data'(id INTEGER PRIMARY KEY, block BLOB)� X##wtable_fts5_probe_fts5_probeCREATE VIRTUAL TABLE _fts5_probe USING fts5(test_col)xC%�indexidx_observations_created_atobservationsCREATE INDEX idx_observations_created_at ON observations(created_at)i9%�indexidx_observations_topicobservationsCREATE INDEX idx_observations_topic ON observations(topic)e7%}indexidx_observations_typeobservations
CREATE INDEX idx_observations_type ON observations(type)xC%�indexidx_observations_session_idobservationsCREATE INDEX idx_observations_session_id ON observations(session_id)�;%�3triggerobservations_fts_updateobservationsCREATE TRIGGER observations_fts_update
AFTER UPDATE ON observations BEGIN
INSERT INTO observations_fts(observations_fts, rowid, title, content, topic)
VALUES ('delete', old.id, old.title, old.content, old.topic);
INSERT INTO observations_fts(rowid, title, content, topic)
VALUES (new.id, new.title, new.content, new.topic);
END�
;%�Itriggerobservations_fts_deleteobservationsCREATE TRIGGER observations_fts_delete
AFTER DELETE ON observations BEGIN
INSERT INTO observations_fts(observations_fts, rowid, title, content, topic)
VALUES ('delete', old.id, old.title, old.content, old.topic);
END�s;%�triggerobservations_fts_insertobservationsCREATE TRIGGER observations_fts_insert
AFTER INSERT ON observations BEGIN
INSERT INTO observations_fts(rowid, title, content, topic)
VALUES (new.id, new.title, new.content, new.topic);
END�B
�_tabletopicstopics
CREATE TABLE topics (
topic TEXT PRIMARY KEY,
observation_count INTEGER NOT NULL DEFAULT 0,
last_activity TEXT NOT NULL,
summary TEXT
)+? indexsqlite_autoindex_topics_1topics� ;;�tableobservations_fts_configobservations_fts_config CREATE TABLE 'observations_fts_config'(k PRIMARY KEY, v) WITHOUT ROWID�==�tableobservations_fts_docsizeobservations_fts_docsizeCREATE TABLE 'observations_fts_docsize'(id INTEGER PRIMARY KEY, sz BLOB)�55�Itableobservations_fts_idxobservations_fts_idxCREATE TABLE 'observations_fts_idx'(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID77�tableobservations_fts_dataobservations_fts_dataCREATE TABLE 'observations_fts_data'(id INTEGER PRIMARY KEY, block BLOB)�+--�tableobservations_ftsobservations_ftsCREATE VIRTUAL TABLE observations_fts USING fts5(
title,
content,
topic,
content='observations',
content_rowid='id'
)P++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)�%%�stableobservationsobservationsCREATE TABLE observations (
id INTEGER PRIMARY KEY AUTOINCREMENT,
session_id TEXT NOT NULL,
type TEXT NOT NULL CHECK(type IN ('decision', 'discovery', 'error_fix', 'preference', 'architecture', 'context')),
topic TEXT NOT NULL,
title TEXT NOT NULL,
content TEXT NOT NULL,
content_hash TEXT NOT NULL UNIQUE,
importance INTEGER NOT NULL DEFAULT 5 CHECK(importance BETWEEN 1 AND 10),
tags TEXT NOT NULL DEFAULT '[]',
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
accessed_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
)7K% indexsqlite_autoindex_observations_1observations f))�tableschema_versionschema_versionCREATE TABLE schema_version (
version INTEGER PRIMARY KEY
)
� �
� ��
� � version
�
version