Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence Categories and Spaces link in Database

AKASH BHARDWAJ December 10, 2013

Hi All,

Can anybody tell me how Spaces and Categories and Sub-categories are linked into Database.

I know about the Space_key and Space _ID under table.

I am using BreadCrumb plugin which shows the flow of my current page.

I need to know how this call is made, which tables are queried to bring the data in front.

2 answers

2 votes
Gregory Kneller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2014

Space categories are actually labels. Here is the relation:

select s.spacekey, l.name from spaces s, content c, content_label cl, label l 
    where s.spaceid=c.spaceid 
    and c.contentid=cl.contentid
    and cl.labelid=l.labelid
    and l.namespace ='team'

0 votes
z April 22, 2020

Spaces can have more than one categories. In case you want them in a single row per space with MYSQL you can use the following query:

select s.spacekey, GROUP_CONCAT(l.name) from SPACES s, CONTENT c, CONTENT_LABEL cl, LABEL l 
where s.spacetype = 'global' and s.spaceid=c.spaceid
and c.contentid=cl.contentid and cl.labelid=l.labelid
and l.namespace='team' group by s.spacekey

  I also added a criteria to get only the site spaces.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events