Skip to content
context Artifact [aa65735515]
Login

Artifact [aa65735515]

Artifact aa65735515237491882d44074e853324a45f8d463a1c090a9956f22ff7343816:


-- Version 24 to 25: covering indexes for project-scoped FTS5 search (ctx_chunk_meta) and
-- account-label lookup in rules-offer/usage (ctx_usage_account). Nothing else changes.
-- Run on its own, with nothing else holding the archive:
--   sqlite3 ~/.ctx/ctx.sqlite < schema/migrate/25-up.sql   (or: ctx does this itself when it opens the archive)

BEGIN IMMEDIATE;
CREATE INDEX IF NOT EXISTS ctx_chunk_meta ON ctx_chunk(id, project, doc_id);
CREATE INDEX IF NOT EXISTS ctx_usage_account ON ctx_usage(account, plan, at) WHERE account IS NOT NULL;

PRAGMA user_version = 25;
COMMIT;