Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039521Openbravo ERPA. Platformpublic2018-10-23 16:302018-10-29 11:21
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q3.23.0PR18Q3.2 
caristu
Core
No
0039521: PG 10: false local changes positive after restoring PG 9.3 dump
Having a PostgreSQL 10 or 11 database created from a dump obtained from 9.3, updata.database incorrectly detects local changes in DB structure.

Workarround: execute 1st update with -Dforce=true parameter.
1. Install Openbravo (at least 18Q1) in PostgreSQL 9.3 (ie. Openbravo Appliance 14.04)
2. Do a pg_dump
3. Restore that pg_dump in a PostgreSQL 10 or 11
4. Run ant update.database
  -> ERROR: local changes detected
No tags attached.
blocks defect 0039516 closed alostale PG 10: false local changes positive after restoring PG 9.3 dump 
Issue History
2018-10-24 10:22alostaleTypedefect => backport
2018-10-24 10:22alostaleTarget Version => 3.0PR18Q3.2
2018-10-25 10:38hgbotCheckin
2018-10-25 10:38hgbotNote Added: 0107567
2018-10-25 10:38hgbotStatusscheduled => resolved
2018-10-25 10:38hgbotResolutionopen => fixed
2018-10-25 10:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/1d1e9758b90f76c9894ccd800232e585888045ac [^]
2018-10-29 11:21caristuNote Added: 0107633
2018-10-29 11:21caristuStatusresolved => closed
2018-10-29 11:21caristuFixed in Version => 3.0PR18Q3.2

Notes
(0107567)
hgbot   
2018-10-25 10:38   
Repository: erp/backports/3.0PR18Q3.2
Changeset: 1d1e9758b90f76c9894ccd800232e585888045ac
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Oct 24 10:31:04 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.2/rev/1d1e9758b90f76c9894ccd800232e585888045ac [^]

fixed bug 39521: false local changes positive restoring PG 9.3 dump on PG 10

  After restoring in PG 10 a DB dump taken in PG 9.3, first update.database run
  incorrectly detects local changes.

  This was caused by many new functions added in PG 10 to trigram extension, those
  functions were unnecessarily included in the model checksum used to check if
  there are local changes.

  Now those functions are excluded: as dbsm only supports plsql functions, we now
  filter out all the ones implemented by binary code, which is how typically
  extension functions are implemented.

---
M src-db/database/model/prescript-PostgreSql.sql
---
(0107633)
caristu   
2018-10-29 11:21   
Code reviewed + tested OK.