Summarising the changes that is to be done. Below are the columns that will be 
renamed


Table
Current Column Name
New Column Name
definitions_nodes_metadata
key
name
value
meta_value
definitions_metadata
key
name
value
meta_value
definitions_annotations
value
annotation
kogito_data_cache
name
cache_name
key
var_name


The PR is also updated with the latest changes



Thanks,
Deepak Joseph

From: Deepak Joseph <[email protected]>
Date: Monday, 9 December 2024 at 11:02 PM
To: [email protected] <[email protected]>
Subject: [EXTERNAL] [DISCUSS] Usage of reserved words as column names
Hello Everyone,

Few of the data-index tables uses reserved keywords as column names (e.g. key, 
value). In most of the cases DBs supports them without any problem but at least 
H2 has problems with this at this moment.

The solution we currently use is to establish the JDBC connection with the 
`NO_KEYWORDS=key,value` argument to bypass the SQL reserved words. There is 
workaround in this case, but it is not a proper solution as we are going to 
need to revisit this at some point.

We are thinking to rename these column names to something more safe and 
appropriate striving for a more proper naming convention.

Related PR: https://github.com/apache/incubator-kie-kogito-apps/pull/2139 

As suggested in the PR comments, maybe we can change
    key -> name                    (definitions_nodes_metadata, 
definitions_metadata)
    value -> stringValue    (definitions_nodes_metadata, definitions_metadata)
    value -> annotation     (definitions_annotations)
    key -> cache_key          (kogito_data_cache)

Please feel free to share any other ideas or suggestions that might help in 
addressing this. I’m happy to explore different approaches.


Thanks,
Deepak Joseph

Reply via email to