-- Migration 036: Add indexes on foreign keys for audit_logs, page_events, and inbox_messages
-- 1. Index on org_id in audit_logs table (used by AdminController::auditPack)
CREATE INDEX idx_audit_logs_org_id ON audit_logs(org_id);

-- 2. Index on user_id in page_events table (to speed up user activity lookup)
CREATE INDEX idx_page_events_user_id ON page_events(user_id);

-- 3. Index on sender_user_id in inbox_messages table (to speed up message author query)
CREATE INDEX idx_inbox_messages_sender ON inbox_messages(sender_user_id);
