-- Migration: 009_remove_redundant_indexes
-- Description: Remove indexes that are redundant or unused

-- Remove redundant share code index
-- idx_share_code_active is superseded by unique idx_sharecode_code_active (migration 008)
-- Both filter WHERE is_active = true, but 008's unique index on (code) is more restrictive
DROP INDEX IF EXISTS idx_share_code_active;

-- Remove unused composite notification index
-- idx_notification_user_sent on (user_id, sent) is never used:
-- - GetPendingNotifications() only filters on sent, not user_id
-- - FindByUser() only filters on user_id, not sent (uses idx_notification_user_created_at)
-- - No queries combine user_id AND sent together
-- The leading column (user_id) queries already use idx_notification_user_created_at
DROP INDEX IF EXISTS idx_notification_user_sent;
