diff --git a/schema/schema.sql b/schema/schema.sql index a7503839..9126fb37 100644 --- a/schema/schema.sql +++ b/schema/schema.sql @@ -66,6 +66,9 @@ CREATE TABLE channel_members ( PRIMARY KEY (channel_id, pubkey) ); +CREATE INDEX idx_channel_members_pubkey ON channel_members (pubkey) + WHERE removed_at IS NULL; + -- ── Users ───────────────────────────────────────────────────────────────────── CREATE TABLE users (