-- Rollback: Recreate removed indexes -- Recreate share code index (from migration 006) CREATE INDEX IF NOT EXISTS idx_share_code_active ON residence_residencesharecode (residence_id) WHERE is_active = true; -- Recreate notification user+sent index (from migration 006) CREATE INDEX IF NOT EXISTS idx_notification_user_sent ON notifications_notification (user_id, sent);