Help requested to construct an SQL query (page hierarchy) for Confluence.

Graham Foster April 25, 2019

I have read only access to our confluence database, and I'm trying to understand the schema.

a) Is there some good documentation on the schema out there / worked examples etc?

b) I have 1 specific query I need to write, which is to be able to pull a "page tree" out for a defined spacekey.

i.e a hierarchical list of the page titles. their "indent level", and permalinks, associated labels and any other page properties I can find.

 

A starter would be much appreciated.

Thanks

1 answer

0 votes
Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2019

@Graham Foster See if this documentation about Confluence database model helps you: https://confluence.atlassian.com/doc/confluence-data-model-127369837.html

 

I also have link to this Confluence database schema pdf , for Confluence v6.x, which may be useful: https://svelab.com/download/confluence6_schema_mysqlviz.pdf

Graham Foster April 26, 2019

Thanks for the starter on this.

I don't suppose you can explain why all the weirdly named table prefixes can you (e..g AO_26DB7F) Are they in some way linked to tables used by plugin's perhaps? Is there a way of figuring out which plugin uses which tables? (like I'm interested in Scroll Versions as a plugin, as I suspect that the "permalinks" for their page identifiers must be held somewhere (but I can't find them!)

Thx

Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2019

Yes, the tables starting with prefixes like "AO..." belong to the plugins. I am not sure though which plugins they belong to ; you can search for each table name online, and you will come to know.

If you are looking for where page metadata like page IDs and their versions are stored, they are stored in "content" table.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events