You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "josedee (via GitHub)" <gi...@apache.org> on 2024/11/05 11:46:10 UTC

[PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

josedee opened a new pull request, #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139

   Closes https://github.com/apache/incubator-kie-issues/issues/1606
   
   The flyway migration sql scripts creates few tables with column names like 'key' and 'value' which are reserved words in H2. Modify the tables which contain these reserved words as column names to something relevant.
   
   
   <!---
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   Many thanks for submitting your Pull Request :heart:! 
   
   Please make sure that your PR meets the following requirements:
   
   - [ ] You have read the [contributors guide](https://github.com/apache/incubator-kie-kogito-runtimes#contributing-to-kogito)
   - [ ] Pull Request title is properly formatted: `KOGITO-XYZ Subject`
   - [ ] Pull Request title contains the target branch if not targeting main: `[0.9.x] KOGITO-XYZ Subject`
   - [ ] Pull Request contains link to the JIRA issue
   - [ ] Pull Request contains link to any dependent or related Pull Request
   - [ ] Pull Request contains description of the issue
   - [ ] Pull Request does not include fixes for issues other than the main ticket
   
   <details>
   <summary>
   How to replicate CI configuration locally?
   </summary>
   
   Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use [build-chain tool](https://github.com/kiegroup/github-action-build-chain) to handle cross repository builds and be sure that we always use latest version of the code for each repository.
    
   [build-chain tool](https://github.com/kiegroup/github-action-build-chain) is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See [local execution](https://github.com/kiegroup/github-action-build-chain#local-execution) details to get more information about it.
   </details>
   
   <details>
   <summary>
   How to retest this PR or trigger a specific build:
   </summary>
   
   - for <b>pull request checks</b>  
     Please add comment: <b>Jenkins retest this</b>
   
   - for a <b>specific pull request check</b>  
     Please add comment: <b>Jenkins (re)run [kogito-apps|kogito-examples] tests</b>
   
   - for <b>quarkus branch checks</b>  
     Run checks against Quarkus current used branch  
     Please add comment: <b>Jenkins run quarkus-branch</b>
   
   - for a <b>quarkus branch specific check</b>  
     Run checks against Quarkus current used branch  
     Please add comment: <b>Jenkins (re)run [kogito-apps|kogito-examples] quarkus-branch</b>
   
   - for <b>quarkus main checks</b>  
     Run checks against Quarkus main branch  
     Please add comment: <b>Jenkins run quarkus-main</b>
   
   - for a <b>specific quarkus main check</b>  
     Run checks against Quarkus main branch  
     Please add comment: <b>Jenkins (re)run [kogito-apps|kogito-examples] quarkus-main</b>
   
   - for <b>quarkus lts checks</b>  
     Run checks against Quarkus lts branch  
     Please add comment: <b>Jenkins run quarkus-lts</b>
   
   - for a <b>specific quarkus lts check</b>  
     Run checks against Quarkus lts branch  
     Please add comment: <b>Jenkins (re)run [kogito-apps|kogito-examples] quarkus-lts</b>
    
   - for <b>native checks</b>  
     Run native checks  
     Please add comment: <b>Jenkins run native</b>
   
   - for a <b>specific native check</b>  
     Run native checks 
     Please add comment: <b>Jenkins (re)run [kogito-apps|kogito-examples] native</b>
   
   - for <b>native lts checks</b>  
     Run native checks against quarkus lts branch
     Please add comment: <b>Jenkins run native-lts</b>
   
   - for a <b>specific native lts check</b>  
     Run native checks against quarkus lts branch
     Please add comment: <b>Jenkins (re)run [kogito-apps|kogito-examples] native-lts</b>
    
   </details>
   
   <details>
   <summary>
   How to backport a pull request to a different branch?
   </summary>
   
   In order to automatically create a **backporting pull request** please add one or more labels having the following format `backport-<branch-name>`, where `<branch-name>` is the name of the branch where the pull request must be backported to (e.g., `backport-7.67.x` to backport the original PR to the `7.67.x` branch).
   
   > **NOTE**: **backporting** is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.
   
   Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
   
   If something goes wrong, the author will be notified and at this point a manual backporting is needed.
   
   > **NOTE**: this automated backporting is triggered whenever a pull request on `main` branch is labeled or closed, but both conditions must be satisfied to get the new PR created.
   </details>
   
   <details>
   <summary>
   Quarkus-3 PR check is failing ... what to do ?
   </summary>
   The Quarkus 3 check is applying patches from the `.ci/environments/quarkus-3/patches`.
   
   The first patch, called `0001_before_sh.patch`, is generated from Openrewrite `.ci/environments/quarkus-3/quarkus3.yml` recipe. The patch is created to speed up the check. But it may be that some changes in the PR broke this patch.  
   No panic, there is an easy way to regenerate it. You just need to comment on the PR:
   ```
   jenkins rewrite quarkus-3
   ```
   and it should, after some minutes (~20/30min) apply a commit on the PR with the patch regenerated.
   
   Other patches were generated manually. If any of it fails, you will need to manually update it... and push your changes.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2469894535

   @pefernan I guess we can merge it, WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "gmunozfe (via GitHub)" <gi...@apache.org>.
gmunozfe commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2470067944

   hi, before merging, have you explore the possibility of using the property `NON_KEYWORDS` in the h2 jdbc URL. This would avoid any conflict without migrating table columns which affects previous deployments.
   https://www.h2database.com/html/commands.html#set_non_keywords


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on code in PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#discussion_r1838200446


##########
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi/V1.45.0.6__modify_columns_with_reserved_words.sql:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table definitions_nodes_metadata alter column key rename to metadata_key;
+alter table definitions_nodes_metadata alter column value rename to metadata_value;

Review Comment:
   I think value should be ok, but since it was reserved by standard, maybe `valueAsChar` ;)?



##########
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi/V1.45.0.6__modify_columns_with_reserved_words.sql:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table definitions_nodes_metadata alter column key rename to metadata_key;
+alter table definitions_nodes_metadata alter column value rename to metadata_value;

Review Comment:
   I think `value` should be ok, but since it was reserved by standard, maybe `valueAsChar` ;)?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2470131604

   Thank you @gmunozfe for sharing that, I agree with you is a valuable option we should consider as an alternative.
   @josedee @pefernan Please consider the above suggestion and share your thoughts, since you're leading this initiative.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "domhanak (via GitHub)" <gi...@apache.org>.
domhanak commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2470084970

   I would like to highlight, that we will soon have users running `10.0.0` applications ( see the ongoing ML vote ). This change might be problematic for users that will try to upgrade their existing DataIndes deployments to next version after 10.0.0.
   Did you consider such scenario during testing please? I want to avoid breaking changes, or changes that would require user to use flyway configuration properties to avoid issues during migration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "pefernan (via GitHub)" <gi...@apache.org>.
pefernan merged PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on code in PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#discussion_r1838187117


##########
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi/V1.45.0.6__modify_columns_with_reserved_words.sql:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table definitions_nodes_metadata alter column key rename to metadata_key;

Review Comment:
   If we are going to renamve, I think we should rename `key` to `name` or `id`



##########
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi/V1.45.0.6__modify_columns_with_reserved_words.sql:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table definitions_nodes_metadata alter column key rename to metadata_key;

Review Comment:
   If we are going to rename, I think we should rename `key` to `name` or `id`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "kie-ci3 (via GitHub)" <gi...@apache.org>.
kie-ci3 commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2457775490

   
   **PR job** `#2` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   <details>
   <summary><b>Reproducer</b></summary>
   
   
   
   build-chain build full_downstream  -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-apps -u https://github.com/apache/incubator-kie-kogito-apps/pull/2139 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution
   
   </details>
   
   
   Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/display/redirect
   
   **Test results:**
   - PASSED: 575
   - FAILED: 11
   
   Those are the test failures: 
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/BasicTypeMappingIT/testBasicTypeMappingDelete/">org.kie.kogito.persistence.postgresql.reporting.BasicTypeMappingIT.testBasicTypeMappingDelete</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, field1MappedField, field2MappedField FROM BasicTypeExtract] [ERROR: relation "basictypeextract" does not exist<br/>  Position: 107] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/BasicTypeMappingIT/testBasicTypeMapping/">org.kie.kogito.persistence.postgresql.reporting.BasicTypeMappingIT.testBasicTypeMapping</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, field1MappedField, field2MappedField FROM BasicTypeExtract] [ERROR: relation "basictypeextract" does not exist<br/>  Position: 107] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/BasicTypeMappingIT/testBasicTypeMappingUpdate/">org.kie.kogito.persistence.postgresql.reporting.BasicTypeMappingIT.testBasicTypeMappingUpdate</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, field1MappedField, field2MappedField FROM BasicTypeExtract] [ERROR: relation "basictypeextract" does not exist<br/>  Position: 107] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/ComplexHierarchicalTypeMappingIT/testComplexHierarchicalTypeMapping/">org.kie.kogito.persistence.postgresql.reporting.ComplexHierarchicalTypeMappingIT.testComplexHierarchicalTypeMapping</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, root, nestedBasicMappedField, nestedComplexCollectionMappedField1, nestedComplexCollectionMappedSubField1 FROM ComplexHierarchicalTypeExtract] [ERROR: relation "complexhierarchicaltypeextract" does not exist<br/>  Position: 176] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/ComplexHierarchicalTypeMappingIT/testComplexHierarchicalTypeMappingDelete/">org.kie.kogito.persistence.postgresql.reporting.ComplexHierarchicalTypeMappingIT.testComplexHierarchicalTypeMappingDelete</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, root, nestedBasicMappedField, nestedComplexCollectionMappedField1, nestedComplexCollectionMappedSubField1 FROM ComplexHierarchicalTypeExtract] [ERROR: relation "complexhierarchicaltypeextract" does not exist<br/>  Position: 176] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/ComplexHierarchicalTypeMappingIT/testComplexHierarchicalTypeMappingUpdate/">org.kie.kogito.persistence.postgresql.reporting.ComplexHierarchicalTypeMappingIT.testComplexHierarchicalTypeMappingUpdate</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, root, nestedBasicMappedField, nestedComplexCollectionMappedField1, nestedComplexCollectionMappedSubField1 FROM ComplexHierarchicalTypeExtract] [ERROR: relation "complexhierarchicaltypeextract" does not exist<br/>  Position: 176] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/HierarchicalTypeMappingIT/testHierarchicalTypeMappingDelete/">org.kie.kogito.persistence.postgresql.reporting.HierarchicalTypeMappingIT.testHierarchicalTypeMappingDelete</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, root, nestedBasicMappedField, nestedBasicCollectionMappedField FROM HierarchicalTypeExtract] [ERROR: relation "hierarchicaltypeextract" does not exist<br/>  Position: 133] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/HierarchicalTypeMappingIT/testHierarchicalTypeMappingUpdate/">org.kie.kogito.persistence.postgresql.reporting.HierarchicalTypeMappingIT.testHierarchicalTypeMappingUpdate</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, root, nestedBasicMappedField, nestedBasicCollectionMappedField FROM HierarchicalTypeExtract] [ERROR: relation "hierarchicaltypeextract" does not exist<br/>  Position: 133] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting/HierarchicalTypeMappingIT/testHierarchicalTypeMapping/">org.kie.kogito.persistence.postgresql.reporting.HierarchicalTypeMappingIT.testHierarchicalTypeMapping</a></summary>
   JDBC exception executing SQL [SELECT ROW_NUMBER() OVER (ORDER BY name, key) as id, name, key, root, nestedBasicMappedField, nestedBasicCollectionMappedField FROM HierarchicalTypeExtract] [ERROR: relation "hierarchicaltypeextract" does not exist<br/>  Position: 133] [n/a]
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting.api/PostgresMappingsApiV1IT/dynamicMappingDefinitionCreation/">org.kie.kogito.persistence.postgresql.reporting.api.PostgresMappingsApiV1IT.dynamicMappingDefinitionCreation</a></summary>
   expected: <200> but was: <500>
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/2/testReport/org.kie.kogito.persistence.postgresql.reporting.database.sqlbuilders/PostgresApplyMappingSqlBuilderIT/testApplyMappingToExistingData/">org.kie.kogito.persistence.postgresql.reporting.database.sqlbuilders.PostgresApplyMappingSqlBuilderIT.testApplyMappingToExistingData</a></summary>
   JDBC exception executing SQL [CREATE TABLE DynamicTypeExtract ( <br/>  key null, <br/>  name varchar, <br/>  field1MappedField text, <br/>  field2MappedField numeric <br/>);<br/>] [ERROR: syntax error at or near "null"<br/>  Position: 42] [n/a]
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on code in PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#discussion_r1838188172


##########
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi/V1.45.0.6__modify_columns_with_reserved_words.sql:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table definitions_nodes_metadata alter column key rename to metadata_key;
+alter table definitions_nodes_metadata alter column value rename to metadata_value;
+alter table definitions_metadata alter column key rename to metadata_key;

Review Comment:
   same here, `key` to `name`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on code in PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#discussion_r1838200446


##########
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi/V1.45.0.6__modify_columns_with_reserved_words.sql:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table definitions_nodes_metadata alter column key rename to metadata_key;
+alter table definitions_nodes_metadata alter column value rename to metadata_value;

Review Comment:
   I think `value` should be ok, but since it was reserved by standard, maybe `stringValue` ;)?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "kie-ci3 (via GitHub)" <gi...@apache.org>.
kie-ci3 commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2457463423

   
   **PR job** `#1` was: **UNSTABLE**
   Possible explanation: This should be test failures
   
   
   <details>
   <summary><b>Reproducer</b></summary>
   
   
   
   build-chain build full_downstream  -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-apps -u https://github.com/apache/incubator-kie-kogito-apps/pull/2139 --skipParallelCheckout
   
   NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution
   
   </details>
   
   
   Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/display/redirect
   
   **Test results:**
   - PASSED: 1631
   - FAILED: 7
   
   Those are the test failures: 
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/testReport/org.kie.kogito.index.service/InmemoryPostgreSqlIndexingServiceIT/___/">org.kie.kogito.index.service.InmemoryPostgreSqlIndexingServiceIT.(?)</a></summary>
   java.lang.RuntimeException: Failed to start quarkus
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/testReport/org.kie.kogito.index.service/KeycloakInmemoryPostgreSqlIndexingServiceIT/testUnauthorizedUserAccess/">org.kie.kogito.index.service.KeycloakInmemoryPostgreSqlIndexingServiceIT.testUnauthorizedUserAccess</a></summary>
   java.lang.RuntimeException: Failed to start quarkus
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/testReport/org.kie.kogito.index.postgresql.reporting/ProcessInstanceVariableMappingIT/testProcessInstanceVariableMapping/">org.kie.kogito.index.postgresql.reporting.ProcessInstanceVariableMappingIT.testProcessInstanceVariableMapping</a></summary>
   java.lang.RuntimeException: Failed to start quarkus
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/testReport/org.kie.kogito.index.postgresql.mapper/JobEntityMapperIT/testMapToModel/">org.kie.kogito.index.postgresql.mapper.JobEntityMapperIT.testMapToModel</a></summary>
   java.lang.RuntimeException: Failed to start quarkus
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/testReport/org.kie.kogito.persistence.postgresql/PostgresStorageServiceIT/testQuery_Equal/">org.kie.kogito.persistence.postgresql.PostgresStorageServiceIT.testQuery_Equal</a></summary>
   java.lang.RuntimeException: Failed to start quarkus
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/testReport/org.kie.kogito.persistence.postgresql.reporting/BasicTypeMappingIT/testBasicTypeMappingDelete/">org.kie.kogito.persistence.postgresql.reporting.BasicTypeMappingIT.testBasicTypeMappingDelete</a></summary>
   java.lang.RuntimeException: Failed to start quarkus
   </details>
   <details>
   <summary><a href="https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-apps-pr/job/PR-2139/1/testReport/org.kie.kogito.trusty.service.postgresql/PostgreSQLTrustyServiceIT/testStoreExplainabilityResult_Counterfactual/">org.kie.kogito.trusty.service.postgresql.PostgreSQLTrustyServiceIT.testStoreExplainabilityResult_Counterfactual</a></summary>
   java.lang.RuntimeException: Failed to start quarkus
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "elguardian (via GitHub)" <gi...@apache.org>.
elguardian commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2470544745

   @fjtirado @gmunozfe @yesamer @pefernan 
   In this case the problem with H2 has surfaced  the problem of column names. Sometimes we use names that are sql keywords for certain database. I would argue that even if we fix the H2 problem without altering the database, we should strive to a more proper naming revisiting columns and check if some future support database have it.
   I would revisit this to a more broader scope to check databases supported and decide from there (after analising the impact) what to do. but this will come back for sure at some point in the future. It is not urgent as there is workaround for this case, but it is not a proper solutions as we are going to need to revisit this at some point.
   I can only see two options when the time comes:
   1. offer a proper orm file remapping the names of those conflicting columns (the thing here is that we need add that to the classpath
   2. redefining column names.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on code in PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#discussion_r1838187117


##########
data-index/data-index-storage/data-index-storage-jpa/src/main/resources/kie-flyway/db/data-index/ansi/V1.45.0.6__modify_columns_with_reserved_words.sql:
##########
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+alter table definitions_nodes_metadata alter column key rename to metadata_key;

Review Comment:
   If we are going to renamve, I think we should rename `key` to `name`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] [kie-issues#1606] Modify columns in the flyway migration scripts which uses sql reserved words [incubator-kie-kogito-apps]

Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on PR #2139:
URL: https://github.com/apache/incubator-kie-kogito-apps/pull/2139#issuecomment-2551302863

   @josedee Can we merge this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org