Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0044612Openbravo ERPY. DBSourceManagerpublic2020-07-15 07:372022-11-03 12:47
guillermogil 
Triage Platform Base 
highminoralways
newopen 
5
3.0PR20Q1.2 
 
AugustoMauch
Core
No
0044612: ORA fails applying changes to columns used in functional indexes
When updating an Oracle database having changes in a column that participates in a functional index, Oracle fails and the change is not applied.

This can occur by either a config script providing those changes or by a regular DB change.

In case a template modifies an indexed column oracle fails on compilation:
SQL Command failed with: ORA-30556: either functional or bitmap join index is defined on the column to be modified
Case 1: regular change
1.1. modify src-db/database/model/tables/C_BPARTNER.xml to set NAME length to 120
1.2. run update.database
  ERROR: ORA-30556: functional index is defined on the column to be modified

Case 2: config scrip
2.1 Modify on a template the column name of C_BPartner:
     <columnSizeChange tablename="C_BPARTNER" columnname="NAME" newSize="120" oldSize="60"/>
2.2. run update.database
  ERROR: ORA-30556
Oracle does not support modifying columns if the participate in functional indexes, we'll recreate the whole table instead.
No tags attached.
related to defect 0044892 closed alostale On install.source config scripts are applied in two steps 
related to feature request 0044896 new Triage Platform Base Add check for dangerous operations in update.database task 
related to defect 0044901 closed Triage Platform Base PostgreSQL fails applying changes to columns used in views (during install.source) 
Issue History
2020-07-15 07:37guillermogilNew Issue
2020-07-15 07:37guillermogilAssigned To => platform
2020-07-15 07:37guillermogilModules => Core
2020-07-15 07:37guillermogilTriggers an Emergency Pack => No
2020-07-15 07:40guillermogilversion => 3.0PR20Q1.2
2020-07-17 16:29shuehnerIssue Monitored: shuehner
2020-08-07 09:24hgbotNote Added: 0121898
2020-08-07 12:18alostaleSummaryIn case a template modifies an indexed column oracle fails => ORA fails applying changes to columns used in functional indexes
2020-08-07 12:18alostaleDescription Updatedbug_revision_view_page.php?rev_id=21461#r21461
2020-08-07 12:18alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21463#r21463
2020-08-07 12:18alostaleProposed Solution updated
2020-08-17 12:32AugustoMauchAssigned Toplatform => AugustoMauch
2020-08-17 12:34AugustoMauchAssigned ToAugustoMauch => alostale
2020-08-17 12:34AugustoMauchReview Assigned To => AugustoMauch
2020-08-26 10:28caristuRelationship addedrelated to 0044892
2020-08-26 11:43caristuRelationship addedrelated to 0044896
2020-08-26 14:41shuehnerRelationship addedrelated to 0044901
2022-02-01 07:24alostaleAssigned Toalostale => Triage Platform Base
2022-11-03 12:40hgbotNote Added: 0142871
2022-11-03 12:47alostaleNote Added: 0142881

Notes
(0121898)
hgbot   
2020-08-07 09:24   
Merge Request created: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/13 [^]
(0142871)
hgbot   
2022-11-03 12:40   
Repository: https://gitlab.com/openbravo/product/dbsm [^]
Changeset: b1d1eea508d36244e5a3cc428e3c0c256088e02b
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 03-11-2022 11:24:30
URL: https://gitlab.com/openbravo/product/dbsm/-/commit/b1d1eea508d36244e5a3cc428e3c0c256088e02b [^]

[create-db] related to BUG-44612: adds test case

---
A src-test/model/configScripts/BASE_MODEL_FUNCT_IDX.xml
M src-test/src/org/openbravo/dbsm/test/configscript/ConfigScriptColumnSizeChange.java
---
(0142881)
alostale   
2022-11-03 12:47   
Fix for 0044892 solves the config script case on install.source