13 lines
854 B
SQL
13 lines
854 B
SQL
-- §22.4a SLICE-3 — configurable collection metadata: cache per-entry values.
|
|
--
|
|
-- Faceted filtering (§5.1) needs each entry's metadata values (priority, custom
|
|
-- enum/tags fields) to compute facet counts and honour filter params. Today the
|
|
-- mirror keeps only `tags_json` + the lifecycle columns and drops `Entry.extra`,
|
|
-- so a declared field's values are unrecoverable. This column persists the full
|
|
-- per-entry metadata mapping (`metadata.metadata_dict(entry)`, known keys +
|
|
-- extra, never the body) as JSON, so `app/facets.py` can read any declared
|
|
-- field uniformly. Additive + nullable — no rebuild. NULL = not yet re-ingested
|
|
-- (the reconciler/webhook fills it on the next sweep) → that entry contributes
|
|
-- no facet values until then. SLICE-4/5 edit panels read the same column.
|
|
ALTER TABLE cached_rfcs ADD COLUMN meta_json TEXT;
|