Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Having a spring clean – most efficient way to clean up the activity stream?

@henrywright

Moderator

Is there a table in the DB that deals specifically with notifications?

Yes. That’d be bp_notifications

If so, I guess I could just empty it before I emptied the stream and stream meta tables.

Shout up if anyone thinks that could be a problem.

Instead of deleting directly from the database, you should use these functions:

  • bp_notifications_delete_notifications_by_type()
  • bp_notifications_delete_notifications_by_item_id()
  • bp_notifications_delete_all_notifications_by_type()
  • bp_notifications_delete_notifications_from_user()

Alternatively, if none of these quite suit your need, go straight for the class method:

  • BP_Notifications_Notification::delete()
Skip to toolbar