The smokesignal.events web application
at main 14 lines 621 B view raw
1-- DID Document storage for atproto_identity::storage::DidDocumentStorage implementation 2CREATE TABLE did_documents ( 3 did varchar(512) PRIMARY KEY, 4 document_json JSON NOT NULL, 5 created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), 6 updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), 7 expires_at TIMESTAMP WITH TIME ZONE DEFAULT NULL 8); 9 10-- Index for expiration cleanup 11CREATE INDEX idx_did_documents_expires_at ON did_documents(expires_at) WHERE expires_at IS NOT NULL; 12 13-- Index for updated_at for LRU-style cleanup 14CREATE INDEX idx_did_documents_updated_at ON did_documents(updated_at);