The smokesignal.events web application
at main 14 lines 591 B view raw
1-- Generic table for storing AT Protocol records 2CREATE TABLE atproto_records ( 3 aturi VARCHAR(1024) PRIMARY KEY, 4 did VARCHAR(256) NOT NULL, 5 cid VARCHAR(256) NOT NULL, 6 collection VARCHAR(256) NOT NULL, 7 indexed_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), 8 record JSONB NOT NULL 9); 10 11CREATE INDEX idx_atproto_records_did ON atproto_records (did); 12CREATE INDEX idx_atproto_records_cid ON atproto_records (cid); 13CREATE INDEX idx_atproto_records_collection ON atproto_records (collection); 14CREATE INDEX idx_atproto_records_indexed_at ON atproto_records (indexed_at);