Add a column to camunda runtime database table

Can we add new column to existing camunda database table and retrieve the value of that column ? Is there any recommended way and example ?

It depends on what you need it for - it could cause problems down the line with upgrading to newer versions. I would suggest that you create an own table to store the data instead of adding columns to any existing tables

Hi @Niall,
Thanks for the quick reply. Got your point. I want to add a column (i.e lastUpdated) on database table with trigger to store the current timestamp on every add/update. I can do that and retrieve the value using java service of camunda right ?

That information should be stored in the history tables and is accessible via the history rest api.

That approach we thought earlier and since history tables are bound to become bigger over the time we are exploring this way to add column with trigger and retrieve. Also this saves the extra query to db.

Do you need this for reporting or alerting?

We have our UI and we want to display this information.

Hi @Niall
How can add foreign key mapping between my custom table to Group table ?