Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037592
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagercriticalalways2018-01-05 15:262018-03-02 16:52
Reporterneil_smithView Statuspublic 
Assigned Toplatform 
PriorityimmediateResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabasePostgreSQLJava version1.8.0_151
OS VersionDatabase version9.3.13Ant version
Product Version3.0PR17Q2.4SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037592: update.database hangs if one module has a column in a table that's in another module not installed

DescriptionHello,

I just recently updated to 3.0MP17Q2.4

When I did the upgrade, everything went well (I went on a new instance and copied all the modules to the new instance).

Now, when I try to install a module update, I get the error (log extract pased at the end).


This is what I have

Module A, B and C

In some cases, I need module A, B and C. In some, only A and B.
Module A and B create columns in module C (C is dependent on A and B, but not A and B on C).
If I only have module A and B installed, I get the error.

This did not happen in the previous version we had installed (3.0PR16Q1.3).

I can't imagine having to create a module for each dependence between 2 modules... In my example, I would have to create 2 new modules, AC and BC... But that's not all, I also would have to change all the tables, windows, processes... Copy the data from the old column to the new one... Everything that uses those columns... And I have lot more than 3 modules...

I'm really stuck, I can't update or do anything now...



     [java] 110490 INFO - Running modulescripts...
     [java] 110621 INFO - Executing moduleScript: org.openbravo.modulescript.HBFix
     [java] 110849 INFO - Executing moduleScript: org.openbravo.modulescript.InitializeCostingMigrationPreference
     [java] 110916 INFO - Executing moduleScript: org.openbravo.advpaymentmngt.modulescript.InitializeAPRMReadyPreference
     [java] 110959 INFO - Updating Application Dictionary data...
     [java] 116275 ERROR - Error while inserting into the database: ERROR: insert or update on table "ad_column" violates foreign key constraint "ad_table_column"
     [java] Détail : Key (ad_table_id)=(8A8A80F63422305B0134225A5624004C) is not present in table "ad_table".
     [java] org.postgresql.util.PSQLException: ERROR: insert or update on table "ad_column" violates foreign key constraint "ad_table_column"
     [java] Détail : Key (ad_table_id)=(8A8A80F63422305B0134225A5624004C) is not present in table "ad_table".
Steps To Reproduce1. Create 2 modules, A and B

2 In module A and B, create a table

3 In module A, create a column in the table in module B (EM_...)
Proposed SolutionIgnore column creation if table doesn't exist (as before)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0034061 closedNaroaIriarte The cascade constraints deletion should be more restrictive 

-  Notes
(0101782)
alostale (manager)
2018-01-19 12:11

The problem is due to incorrect module definition. If module A and B use artifacts from C, they should depend on it and they cannot be installed without it.

Before fix 0034061 references from A and B were removed but the state was somehow inconsistent (ie. what you had in DB was not what A and B defined).
(0101802)
neil_smith (reporter)
2018-01-19 14:52

Well it worked fine before... We developped things this way because it worked that way...

I can't make A and B dependent on C, that would mean that we have to install module C everywhere, and that wouldn't be correct.

How can I correct my modules? Do I have to create a module (AC) for these objects? But how do I call the columns in the table of module A that have to be added to the table in module C? EM_AC_COLUMN_NAME? Or can I simply call it C_COLUMN_NAME and define it as a table reference in the AD and set it's definition to point to the right table? To be honnest, none of these sound right to me...
And if I have to change the column name, I'm going to loose all the data in that column, and that is not concievable...

Is it not possible to make it work as before? Or at least for EM_ columns, if the destination table doesn't exist, don't create the column.

We will have to refactor everything and that represents 100s of hours of updating the database, the sources, testing everything...

Can you please help me with this, it has huge implications for us.

Thanks for your time
Best regards
Neil
(0102941)
neil_smith (reporter)
2018-03-02 16:52

Thanks for your help...

- Issue History
Date Modified Username Field Change
2018-01-05 15:26 neil_smith New Issue
2018-01-05 15:26 neil_smith Assigned To => platform
2018-01-05 15:26 neil_smith Modules => Core
2018-01-05 15:26 neil_smith Triggers an Emergency Pack => No
2018-01-19 12:07 alostale Relationship added related to 0034061
2018-01-19 12:11 alostale Note Added: 0101782
2018-01-19 12:11 alostale Status new => closed
2018-01-19 12:11 alostale Resolution open => no change required
2018-01-19 14:52 neil_smith Note Added: 0101802
2018-03-02 16:52 neil_smith Note Added: 0102941


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker