Forum Moderators: coopster
At present when we develop CMS driven websites, when content is deleted it is marked as deleted within our MySQL database so it is never actually deleted incase, for example, it was done by accident. We do this by having a table field simply called "deleted" set to either 0 or 1.
What I am asking is does anyone else do this or something similar? And if you do, what method do you undertake yourself or recommend?
Thank you.
Just remember, when you move, to move with id (don't change it), so that you can someday restore it.
Also when performing many deletions run OPTIMIZE [dev.mysql.com]
However it all depends if you want to preserve content or not.
I have one table, where I perform huge deletions, I delete everything older than 30 days and some data older than 3 days and don't store anything, but that's up to you.
Regards
Michal