Skip to content

Commit

Permalink
[RHCLOUD-37954] Delete orphan email endpoints (#3302)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-duval authored Feb 18, 2025
1 parent b132384 commit f090ca4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DELETE FROM endpoints ep WHERE endpoint_type_v2='EMAIL_SUBSCRIPTION'
AND NOT EXISTS (SELECT 1 FROM endpoint_event_type WHERE endpoint_id=id)
AND NOT EXISTS (SELECT 1 FROM behavior_group_action WHERE ep.id=endpoint_id)
AND NOT EXISTS (SELECT 1 FROM notification_history WHERE ep.id=endpoint_id);

0 comments on commit f090ca4

Please sign in to comment.