I am creating a content management site that will also contain other features. When an admin item deletes an item through the admin panel, I would like this item to be moved to the "trash" within 30 days (then automatically deleted).
What is the best way to implement this feature?
One of my ideas was to have the βDeletedβ bit column in my table, and then only show WHERE Hide=0 entries. However, this would mean having to remember this condition every time I SELECT from a table.
Another idea I had was to have a second table to which records will be deleted when deleted. However, I have many tables on my website, so that would mean doubling the number of tables and duplicating table structures (which could cause consistency problems in the future).
Ideally, I would like to have a "RecycleBin" table that all records are moved to, but this can contain 100 columns for storing data from all different tables.
If anyone has any other ideas, that would be very helpful.
Thanks.
source share