Uninstalling (or disabling!)

This plugin uses its very own notification types. Unfortunately, when uninstalled it leaves them behind: these are persistent. There is no way for the logic to catch when you uninstall the plugin. Unfortunately they will cause an error on your users UI if you uninstall the plugin and fail to delete them.

If you remove the plugin, please use a variant of this script at the rails console afterwards to delete the notifications:

Notification.where(notification_type: [800,801,802]).limit(10000).destroy_all

You may have to run this several times if you have a very large forum and have used the plugin for a while.

Another alternative is to use this to do it in one go (not tested on a big forum but should work)

 Notification.where(notification_type: [800,801,802]).find_each do |follow_notification|
  follow_notification.destroy
 end

Longer term we may add a button to the UI to carry this out.

2 Likes

This should no longer be necessary as I’ve added a UI screen to perform this in one click: FEATURE: add an admin screen to permit deletion of notifications online by merefield · Pull Request #23 · paviliondev/di