mirror of
https://github.com/block/buzz.git
synced 2026-10-27 20:41:57 +00:00
15 lines
708 B
SQL
15 lines
708 B
SQL
-- ── Archived identities (NIP-IA) ──────────────────────────────────────────────
|
|
-- Conformance: archive cannot hide a key in another community. PK scoped.
|
|
|
|
CREATE TABLE archived_identities (
|
|
community_id UUID NOT NULL REFERENCES communities(id),
|
|
pubkey TEXT NOT NULL,
|
|
consent_path TEXT NOT NULL CHECK (consent_path IN ('self', 'owner', 'admin')),
|
|
actor TEXT NOT NULL,
|
|
reason TEXT,
|
|
replaced_by TEXT,
|
|
request_event_id TEXT NOT NULL,
|
|
archived_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
PRIMARY KEY (community_id, pubkey)
|
|
);
|