Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034787Openbravo ERPY. DBSourceManagerpublic2016-12-20 14:032019-03-11 09:58
shuehner 
shuehner 
highminorhave not tried
closedfixed 
5
 
 
vmromanos
Core
No
0034787: DBinconsistency in 1 view between 9.3 & 9.5 versions of postgres which seems to need dbsm changes
The module org.openbravo.warehouse.piclinglist has a view OBWPL_PICKINGLIST_PICK_EDIT which exports differently on PostgreSQL 9.3 and 9.5 and both exported versions are not useful for the other postgres version.

If not other view syntax can be found working out of the box on both looks like dbsourcemanager needs to be changed to support this.

Current pi
Clone the following 2 modules (note: 1st is just dependency of 2nd and itself not interesting here)
https://code.openbravo.com/erp/pmods/org.openbravo.warehouse.structure [^]
https://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist [^]
install.source using PostgreSQL 9.5
Mark pickinligst module as in development:
- update ad_module set isindevelopment = 'Y' where javapackage = 'org.openbravo.warehouse.pickinglist';
- run export.database
- Notice diff creating 1 extra set of parantheses

2nd environment same pi with same modules
- run install.source with PostgreSQL 9.3
- Apply this diff from above
- run update.database
- set module in development also
- run export.database

-> See that diff is not maintained but 'removed' again.

That means there seems to be no easy identical xml for the moment which is compatible between 9.3 and 9.5 for this view
-
No tags attached.
diff org.openbravo.warehouse.pickinglist.dbcons95.diff (6,235) 2016-12-20 14:04
https://issues.openbravo.com/file_download.php?file_id=10194&type=bug
Issue History
2016-12-20 14:03shuehnerNew Issue
2016-12-20 14:03shuehnerAssigned To => platform
2016-12-20 14:03shuehnerModules => Core
2016-12-20 14:03shuehnerTriggers an Emergency Pack => No
2016-12-20 14:04shuehnerNote Added: 0092856
2016-12-20 14:04shuehnerFile Added: org.openbravo.warehouse.pickinglist.dbcons95.diff
2016-12-21 09:39alostaleStatusnew => acknowledged
2019-03-10 19:24hgbotCheckin
2019-03-10 19:24hgbotNote Added: 0110331
2019-03-10 19:24hgbotStatusacknowledged => resolved
2019-03-10 19:24hgbotResolutionopen => fixed
2019-03-10 19:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/ded71ebe516565655c94055fe367eee8ea0b5538 [^]
2019-03-10 19:25shuehnerAssigned Toplatform => shuehner
2019-03-10 19:25shuehnerReview Assigned To => vmromanos
2019-03-11 09:58vmromanosNote Added: 0110336
2019-03-11 09:58vmromanosStatusresolved => closed

Notes
(0092856)
shuehner   
2016-12-20 14:04   
Example diff of export.db on PostgreSQL 9.5 compared to tip of the module repo.
(0110331)
hgbot   
2019-03-10 19:24   
Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: ded71ebe516565655c94055fe367eee8ea0b5538
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Sun Mar 10 18:34:10 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/ded71ebe516565655c94055fe367eee8ea0b5538 [^]

Fixed 34787. Avoid dbconsistency issue with PostgreSQL >=9.5

As explained in issue 34787 there is a non-solvable dbconsistency issue with
this view depending on postgres version.

When exporting it with PostgreSQL >= 9.5 an extra set of parenthesis is added:
from
- COALESCE(sd.m_attributesetinstance_id, '0'),
to
- (COALESCE(sd.m_attributesetinstance_id, '0')),

This is a formal change only with no functional impact.

As preparation to move Openbravo CI to default to PostgreSQL 10 when running
test commit this change once to get a clean export on this newer version.

Note:
This will create the inverse problem when running dbconsistency check on older
postgres like 9.3 (no issue as not tested by default in CI anymore soon).

---
M src-db/database/model/views/OBWPL_PICKINGLIST_PICK_EDIT.xml
---
(0110336)
vmromanos   
2019-03-11 09:58   
Code review OK