init codebase

This commit is contained in:
2026-02-17 17:30:45 -05:00
parent a3b28549b4
commit f7e2755a91
175 changed files with 21600 additions and 232 deletions
@@ -0,0 +1,20 @@
CREATE INDEX IF NOT EXISTS idx_messages_channel_created
ON messages (channel_id, created_at);
--;;
CREATE INDEX IF NOT EXISTS idx_messages_parent
ON messages (parent_id)
WHERE parent_id IS NOT NULL;
--;;
CREATE INDEX IF NOT EXISTS idx_messages_search
ON messages
USING GIN (to_tsvector('english', body_md));
--;;
CREATE INDEX IF NOT EXISTS idx_notifications_user_unread
ON notifications (user_id, created_at)
WHERE read = false;
--;;
CREATE INDEX IF NOT EXISTS idx_channel_members_user
ON channel_members (user_id);
--;;
CREATE INDEX IF NOT EXISTS idx_community_members_user
ON community_members (user_id);