Documentation of the entire database

Hi, I’ve recently started performing analytics on the Community feature of our product. In the plugins, I can see the codes and the list of tables, which expands to the column name and type. However, there are many columns that store data directly set by the ‘Discourse’ team.

So, is there any documentation of the entire database like, the table- column name, column definition, and if it’s an id then how is it configured.

Thanks in advance!

We do not keep any documentation of our database and its usages.

The only form of documentation we keep is, which is solely for our API.

Perhaps it would be more productive to expand on what kind of analytics you are doing.

1 Like

Hey, thanks for the reply.

My analysis involves segregating the responses (likes, posts, etc) by user type (admins/customers). Also, there’s one table named ‘user_actions’ which has a column named ‘action_type’. This column contains numerical values like 1,2,3… upto 15. But, there’s no mention what these numberical values signifies.

The example I shared above is one of the scenarios. But, more scenarios could come later hence I’m looking for a document where everything is properly defined.

Thanks in advance!

I think it would help if you have someone on your side who may have some understanding of Rails. The database records you talk about typically maps to an ActiveRecord model in

As an example here, you can simply visit the user_action model in that folder


There’s also a handy info box in the data explorer tree as well if you didn’t want to go digging in the code:


Both are useful solutions, but can only mark one as a ‘Solution’ so selected the easier one, however having the code directory will be useful in future deep dives. Thanks @JammyDodger and @nat :smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.