Results 1 to 5 of 5
Thread: How to get rid of PM's?
Nov 13, 2013, 20:03 #1
- Join Date
- Aug 2010
- 2 Post(s)
- 0 Thread(s)
How to get rid of PM's?
My website allows Members to send Private Messages to each other.
On the back-end, I have things modeled this way...
member -||------0<- pm_recipient ->0-----||- private_message
- id - username and so on...
- member_id_to - pm_id - created_on - read_on - deleted_on - purged_on (This is when the Recipient empties his/her Trash)
- id - member_id_from - subject - body - sent_on - sender_deleted_on - sender_purged_on (This is when the Sender empties his/her Trash)
As my code stands now, when a Member empties his/her Trash, I never physically remove any PM's. I just mark them as "purged" so they are no longer shown in a User's account.
The problem is that at some point I will need to start deleting PM's because I don't have infinite storage space?!
But how do I go about this??
1.) If a Sender "purges" a PM, then I can't get rid of it, because the Recipients might still want to keep it.
So what do I do?
2.) Where does the storage issue really exist?
Records in the "pm_recipient" table have to be extremely small considering all they hold are "keys" and dates.
I suppose the "private_message" table takes up more space, but considering PM's cannot exceed 1024 characters, again, maybe that isn't much of an issue.
I am adding in a new feature which limits each Member to 100 PM's in their Inbox + Sent + Deleted Folders.
But does it make sense to could a PM in a person's Inbox (i.e. "pm_recipient" record) the same as a Sent PM (i.e. "private_message")?
3.) In general, what is a good strategy for cleaning out old PM's?
Things are sorta weird because I normalized my data, instead of making all PM's the same size (i.e. Sent PM = Incoming PM)
Hope this makes sense?!