Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0043790 | Openbravo ERP | 00. Application dictionary | public | 2020-04-20 13:41 | 2022-02-01 07:24 |
Reporter | shuehner | ||||
Assigned To | Triage Platform Base | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0043790: Not possible to uninstall a module having grid config for a contained tab or field defined | ||||
Description | If a grid config for a tab or field contained in a module exists in the database it is not possible to uninstall that module. Problem are the 2 foreign-keys: - obuiapp_gc_tab -> ad_tab - obuiapp_gc_field -> ad_field Which are not declared with onDeleteCascade. For this use-case when deleting a module any custom grid-config should be probably delete as well instead of breaking the module-uninstall (current behavior). Error is like this using steps below: [java] 30490 [main] INFO org.apache.ddlutils.platform.PGStandardBatchEvaluator - Batch statement failed. Rolling back and retrying all the statements in a non-batched connection. [java] 30923 [main] WARN org.apache.ddlutils.platform.PGStandardBatchEvaluator - SQL Command failed with: ERROR: insert or update on table "obuiapp_gc_field" violates foreign key constraint "obuiapp_gc_field_field" [java] Detail: Key (ad_field_id)=(0787AC0FCA6742AE91D991D2DF849052) is not present in table "ad_field". [java] 30924 [main] WARN org.apache.ddlutils.platform.PGStandardBatchEvaluator - -- END [java] ALTER TABLE OBUIAPP_GC_FIELD [java] ADD CONSTRAINT OBUIAPP_GC_FIELD_FIELD FOREIGN KEY (AD_FIELD_ID) REFERENCES AD_FIELD (AD_FIELD_ID) [java] 30927 [main] WARN org.apache.ddlutils.platform.PGStandardBatchEvaluator - SQL Command failed with: ERROR: insert or update on table "obuiapp_gc_tab" violates foreign key constraint "obuiapp_gc_tab_tab" [java] Detail: Key (ad_tab_id)=(14BDEAB664C146DCB662B2E3EA7A495E) is not present in table "ad_tab". [java] 30928 [main] WARN org.apache.ddlutils.platform.PGStandardBatchEvaluator - -- END [java] ALTER TABLE OBUIAPP_GC_TAB [java] ADD CONSTRAINT OBUIAPP_GC_TAB_TAB FOREIGN KEY (AD_TAB_ID) REFERENCES AD_TAB (AD_TAB_ID) | ||||
Steps To Reproduce | Indirectly noticed with: fresh pi with 2 modules on top https://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations [^] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core [^] ant run.all.tests That contains tests creating grid config apparently and leaving them present after the test Delete the 2 modules cloned above run update.database Error about those 2 foreign keys here having non-compliant data is shown. | ||||
Proposed Solution | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2020-04-20 13:41 | shuehner | New Issue | |||
2020-04-20 13:41 | shuehner | Assigned To | => platform | ||
2020-04-20 13:41 | shuehner | Modules | => Core | ||
2020-04-20 13:41 | shuehner | Triggers an Emergency Pack | => No | ||
2022-02-01 07:24 | alostale | Assigned To | platform => Triage Platform Base |
There are no notes attached to this issue. |