In my website, users can report comments. Those reports are verified by operators and, based on a conclusion, they will mark the report as "No action" or "Deleted". The "Deleted" status of a report means that the comment was deleted.

Those users which report comments can see the report status in their account dashboard. So they will know at some time what happen with comments reported.

If the status given by an operator is "Deleted", then means I should delete the reported comment. And, of course, that comment should not be visible anymore to users.

But, each report from my database has an ID of that comment with a foreign key. So I'm thinking of just hiding the comment and not to really delete it. Sounds pretty good, until the user who made that comment asks me to delete all his data from my database (GDPR rules).

I'm thinking of changing the comment text to "whatever, deleted", but doesn't sounds that good. This means I will have comments unused in my database.

Also, accepting the report comment id column (which has foreign key) to accept null values, doesn't sounds to good either.

So, how do you work with this ? How do you keep a good and logic relation in the database as long as an user asks to delete his data if that data has a relation with other users data ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.