Deleting a users posts (with large post count+history)

I think that what you’ll need to do is select all posts owned by the user and replace the post with

Post deleted at request of user

Something like

Post.where("id = 123").update_all(raw: "Post deleted...")

That’s not tested. You’d want to test it. I’m not sure if you’d need to rebake those posts or not.

Edit: I think that’d still leave the edit history, though. But, maybe only if there were an edit history.

1 Like