I have a D5 site with thousands of nodes and many, many more comments. Since this site is news-oriented,many of the stories are no longer relevant and are kept for archival reasons. I would like to keep the nodes and delete all the comments relating to nodes that are older then one year ago.
I'm comfortable with SQL and building my own module, I'm wondering what issues I might run into if I delete old comments. Any tips or advice would be most welcome.
:]
There shouldn't be any problems. Wipe them out!
DISCLAIMER: I have never developed using drupal 5.x. Only 6. So I may need some correction on some small details.
I was going to recommend Views Bulk Operations to delete the comments per node type, however, it doesnt seem to be developed for 5.x.
You have a few options on how to do this. Here is one:
UPDATE HOOK:
If you have a helper module, create an update hook. Then you can run this using update.php. The logic behind this would be something like (i haven't tested the query)
then
However, if there are too many comments, your request may time out.