search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

add platform and source_collection columns to documents table (#1)

prep for multi-platform indexing (standard.site ecosystem):
- platform TEXT: identifies source platform (leaflet, pckt, offprint)
- source_collection TEXT: the lexicon collection name

backfills existing records as platform='leaflet', source_collection='pub.leaflet.document'

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

authored by

nate nowack
Claude Opus 4.5
and committed by
GitHub
54387fad e264ee4e

+8
+8
backend/src/db/schema.zig
··· 119 119 client.exec("ALTER TABLE stats ADD COLUMN cache_hits INTEGER DEFAULT 0", &.{}) catch {}; 120 120 client.exec("ALTER TABLE stats ADD COLUMN cache_misses INTEGER DEFAULT 0", &.{}) catch {}; 121 121 122 + // multi-platform support: track source platform and collection 123 + client.exec("ALTER TABLE documents ADD COLUMN platform TEXT DEFAULT 'leaflet'", &.{}) catch {}; 124 + client.exec("ALTER TABLE documents ADD COLUMN source_collection TEXT DEFAULT 'pub.leaflet.document'", &.{}) catch {}; 125 + 126 + // backfill existing records (idempotent - only updates NULLs) 127 + client.exec("UPDATE documents SET platform = 'leaflet' WHERE platform IS NULL", &.{}) catch {}; 128 + client.exec("UPDATE documents SET source_collection = 'pub.leaflet.document' WHERE source_collection IS NULL", &.{}) catch {}; 129 + 122 130 // vector embeddings column already added by backfill script 123 131 }