We run a Confluence service with many users from other groups. We want to get produce reports of pages that have unsaved changes. I am trying to tell this from database queries. We have collaborative editing enabled and are on Confluence Server 7.13.0.
When I create a brand new page and hit Publish, two rows are created in the CONTENT table, with CONTENTTYPE = 'Page' and VERSION=1. One has a null PREVVER and CONTENT_STATUS='current'. The other has PREVVER pointing to the first one and CONTENT_STATUS='draft'.
I do not understand why there is a draft record when no changes have been made; after hitting Publish the page is displayed, it is not bring edited. I have read https://confluence.atlassian.com/confkb/how-do-drafts-work-on-confluence-938043306.html and it does not seem to explain this observation.
I want to write a query that will return all pages with unsaved changes. When I make an unsaved change I can see the HIBERNATEVERSION increase on the draft record, but I can't find anything that tells me the changes are unsaved. I know that once the changes are saved there will be another current record created, but I can't tell whether the draft record has unsaved changes, and it appears that every page has a draft record. I can see that CONTENTPROPERTIES.PROPERTYNAME = 'sync-rev' changes when there's a content change, but that's still not enough. What does that value point to?