---
title: "Where is Scaffolding data stored?"
canonical: "https://support.appfire.com/space/SCAFS/477601175/Where%20is%20Scaffolding%20data%20stored%3F"
format: markdown
---
> Macro (aura-html)

## Answer

Scaffolding data is stored in the table `OS_PROPERTYENTRY` with `entity_id` as a foreign key to `CONTENT.contentid`.

- The history/versioning of Confluence leads to many entries with the same `OS_PROPERTYENTRY.entity_id`.
- The latest/current version is the entry with `OS_PROPERTYENTRY.entity_key` = `"~metadata." + n`, where `n` = `CONTENT.version`.

Here is an SQL example to get the latest version of a page's Scaffolding data:

```
select c.contentid, c.title, c.version, o.text_val

from CONTENT c, OS_PROPERTYENTRY o 

where c.title='My Page' and c.prevver is NULL and c.contentid=o.entity_id and o.entity_key=concat('~metadata.',c.version)
```