PostgreSQL versioncomment update Edited

Hi,

I'm in desperate need of retaining attachment comment when uploading a new attachment version. I'm brave enough to mess with the database so I went to content table, changed the versioncomment value of the new inserted row and much to my despair the change was not propagated to the client. Moreover, the original attachment comment was back once I uploaded a new attachment version from the client.  Any tips how to change the version commemt outside the client?

Edit: I suppose there is some kind of caching involved. It took about an hour to show the changed comment in client. Is there a way around this?

Edit2: I have found the Content cache needs to be flushed. I have set the cache size to 1 item and now it seems to be working. However, I'm not sure if there are some unforeseen consequences when limiting the content cache in such manner.

Petr

 

1 answer

0 vote

Do not alter the database directly.  As you say, there are caching issues, but it's not just the cache you need to worry about, and data may be written back destroying your change.  Your cache change may also cause problems, although it won't corrupt data.

If you insist on doing this with SQL, then you must have Confluence shut down when you do it.

A better option would be to write an add-on that can support your changes.  I would lean towards a Script Runner REST endpoint though.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

368 views 20 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you