Clarification on Topic/Post Persistence

Hi I just wanted to clarify something regarding Topic/Post persistence as I found a fair bit of posts indicating that topic/posts are soft-deleted in the database Ref1 Ref2. Firstly let me state the requirement -

For compliance reasons, at any point of time we need a backup of all posts within the last 180 Days. (This is for a financial discussion forum, hence the requirement)

My idea about discourse’s basic post structure so far is that -

A Topic is the first post or content to initiate a discussion, and all subsequent replies to this topic or posts in this topic are considered as posts.

My understanding was that all content of the topics and posts tables in the database contain the original data with a flag indicating whether they are visible to public users or not, but as I experimented with this, I found that posts were being replaced with the content “(post deleted by author)” . So I suppose my questions are along the following -

  1. What is the current default policy for persisting post/topic data following a user/mode delete/edit
  2. Is there an admin switch to change this
  3. Could I get a reference to the tables that facilitate this other than posts/topics if any? We have a read-only database user that we plan to interface with external scripts for performing this data-crunching.
  4. Is data persisted in the context of users editing their posts?
  5. [Wishful Thinking] : Is there an automatic data backup mechanism that exports the data in human readable format?

Thank you once again, I appreciate your time :slight_smile:

Can’t speak to all of this, but:

  • There is a setting to “disallow deleting posts older than x.” The default is/was to allow users to delete their post for 1 year. You may wish to adjust this to prevent deletions at all.
  • You may also wish to look at the “Ninja edit Window.” This allows a member to edit their post within a few minutes of the original post time without having the changes show up in the edit history. This is primarily so you can fix typos and such. For your use case, you may want to make sure every edit is visible in the post’s history.
2 Likes

These are interesting workarounds and I will consider them, thank you!