Notification function called whenever a database is about to be deleted from memory.
This function is called before the operation.