astuto
astuto copied to clipboard
Comments soft deletion
Deleting a parent comment should not result in the deletion of all child comments. In order to avoid that, comment deletion should be a soft delete, so instead of destroying the record in the database just change a flag column on it.
For example, a is_deleted flag could be added to comments, so that when it is false the comment is not deleted, when it is set to true the comment is considered deleted.
Is it really necessary? If a comments gets deleted (by author or by administrators) then all its children comments would remain available, but the context given by the deleted parent comment is lost.