diff options
Diffstat (limited to 'schema.sql')
| -rw-r--r-- | schema.sql | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/schema.sql b/schema.sql index e624369..1d38f7a 100644 --- a/schema.sql +++ b/schema.sql @@ -1,4 +1,4 @@ --- ai-memory schema, version 3. +-- ai-memory schema, version 6. -- -- commits : one row per git commit, derived from `git log' by `sync'. -- symbols : one declared identifier per row (proc, fn, type, const, var). @@ -63,6 +63,16 @@ create index if not exists symbol_basename_idx on symbols (basename); -- `log' walks commits newest-first; the index lets it stop after LIMIT rows. create index if not exists commit_ts_idx on commits (author_ts); +-- blobs: the C/C++ declaration cache. One row per git blob that ctags has +-- parsed, keyed by object id, holding that blob's tags as "<ctags kind>\t<name>" +-- lines. A blob's content cannot change, so a row can never go stale; this is +-- purely a speed cache -- drop the table and the next `sync' re-derives it in a +-- couple of ctags runs per new file version instead of one per commit per file. +create table if not exists blobs ( + blob text primary key, + tags text not null +); + create virtual table if not exists reasoning_fts using fts5 ( body, content = 'reasoning', content_rowid = 'id' ); @@ -80,4 +90,4 @@ create trigger if not exists reasoning_after_update after update on reasoning be insert into reasoning_fts (rowid, body) values (new.id, new.body); end; -pragma user_version = 5; +pragma user_version = 6; |
