---
title: "How to identify active Comala Publishing spaces with SQL"
canonical: "https://support.appfire.com/space/SUPPORT/3825795623/How+to+identify+active+Comala+Publishing+spaces+with+SQL"
format: markdown
---
## Summary

When you plan a migration of **Comala Publishing** from Confluence Data Center to Confluence Cloud, you might first need to know which spaces use the app. This article provides database queries that identify the spaces where Comala Publishing is active.

## Identify active Comala Publishing spaces

Use the following SQL queries to get the list of spaces where the app is active.

### Query for both source and target spaces

This query returns all spaces where Comala Publishing is configured and not explicitly disabled.

```
SELECT
   S.SPACENAME as SPACE_NAME,
   S.SPACEKEY as SPACE_KEY
FROM
   BANDANA as B,
   SPACES as S,
   CONTENT as C
WHERE
   B.BANDANAKEY LIKE '%publishing%'
   AND B.BANDANACONTEXT = S.SPACEKEY
   AND C.SPACEID = S.SPACEID
   AND C.CONTENTTYPE IN ('PAGE','BLOGPOST')
   AND C.CONTENT_STATUS = 'current'
   AND B.BANDANAVALUE NOT LIKE '%disabled=true%'
GROUP BY SPACENAME, SPACEKEY;
```

### Query for source spaces only

Use this query to identify spaces configured as a source for publishing.

```
SELECT
   S.SPACENAME as SPACE_NAME,
   S.SPACEKEY as SPACE_KEY
FROM
   BANDANA as B,
   SPACES as S,
   CONTENT as C
WHERE
   B.BANDANAKEY LIKE '%publishing.destination%'
   AND B.BANDANACONTEXT = S.SPACEKEY
   AND C.SPACEID = S.SPACEID
   AND C.CONTENTTYPE IN ('PAGE','BLOGPOST')
   AND C.CONTENT_STATUS = 'current'
   AND B.BANDANAVALUE NOT LIKE '%disabled=true%'
GROUP BY SPACENAME, SPACEKEY;
```

### Query for target spaces only

Use this query to identify spaces configured as a target (destination) for publishing.

```
SELECT
   S.SPACENAME as SPACE_NAME,
   S.SPACEKEY as SPACE_KEY
FROM
   BANDANA as B,
   SPACES as S,
   CONTENT as C
WHERE
   B.BANDANAKEY LIKE '%publishing.source%'
   AND B.BANDANACONTEXT = S.SPACEKEY
   AND C.SPACEID = S.SPACEID
   AND C.CONTENTTYPE IN ('PAGE','BLOGPOST')
   AND C.CONTENT_STATUS = 'current'
   AND B.BANDANAVALUE NOT LIKE '%disabled=true%'
GROUP BY SPACENAME, SPACEKEY;
```

> ℹ️ You currently can't retrieve a feature-level mapping, for example, the specific features used on each page, with a database query.