Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0043790 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Openbravo ERP] 00. Application dictionary | minor | have not tried | 2020-04-20 13:41 | 2022-02-01 07:24 | |||||||
Reporter | shuehner | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
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. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
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 |
Copyright © 2000 - 2009 MantisBT Group |