Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009454Openbravo ERPY. DBSourceManagerpublic2009-06-12 12:042009-06-20 00:00
marvintm 
marvintm 
immediatecriticalhave not tried
closedfixed 
5
 
2.50MP2pi 
Core
No
0009454: Recreation of tables in modules could lead to loss of views in PostgreSQL
When an update.database is performed in PostgreSQL, sometimes tables are recreated. When this happens, the original table is at some point removed from the database (and later created again), which leads to dependant objects being also removed. Specifically, views are dropped. To fix this, the full update.database recreates all the views at the end of the process.

However, update.database.mod doesn't load the views if they don't belong to a module, and therefore, doesn't recreate them. This means that if some Core views depend on a Core table that is recreated during the installation of a module (which happens, for example, if a module adds columns to C_BPARTNER), those views will be lost.
Install module Human Capital Management in PostgreSQL. 20 Core views will be dropped and not recreated.
DBSM needs to take this into account.
No tags attached.
Issue History
2009-06-12 12:04marvintmNew Issue
2009-06-12 12:04marvintmAssigned To => marvintm
2009-06-12 12:48AinhoaPagolaIssue Monitored: AinhoaPagola
2009-06-12 12:53hgbotCheckin
2009-06-12 12:53hgbotNote Added: 0017250
2009-06-12 12:53hgbotStatusnew => resolved
2009-06-12 12:53hgbotResolutionopen => fixed
2009-06-12 12:55hgbotCheckin
2009-06-12 12:55hgbotNote Added: 0017251
2009-06-12 12:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/37f18c5d10d4954bd35698ac5e10abe26dceeb2e [^]
2009-06-12 13:50AinhoaPagolaNote Added: 0017260
2009-06-19 12:58sureshbabuStatusresolved => closed
2009-06-19 12:58sureshbabuNote Added: 0017477
2009-06-19 12:58sureshbabuFixed in Version => pi
2009-06-20 00:00anonymoussf_bug_id0 => 2809277

Notes
(0017250)
hgbot   
2009-06-12 12:53   
Repository: dbsourcemanager
Revision: 335
Author: marvintm
Date: 2009-06-12 12:53:56 +0200 (Fri, 12 Jun 2009)

Fixed issue 9454. Core views should no longer be dropped when applying a module.

---
U trunk/src/org/apache/ddlutils/Platform.java
U trunk/src/org/apache/ddlutils/platform/PlatformImplBase.java
U trunk/src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java
---

https://dev.openbravo.com/websvn/dbsourcemanager/?rev=335&sc=1 [^]
(0017251)
hgbot   
2009-06-12 12:55   
Repository: erp/devel/pi
Changeset: 37f18c5d10d4954bd35698ac5e10abe26dceeb2e
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Jun 12 12:54:21 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/37f18c5d10d4954bd35698ac5e10abe26dceeb2e [^]

Fixed issue 9454. Core views should no longer be dropped when applying a module.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0017260)
AinhoaPagola   
2009-06-12 13:50   
I've retested the issue with Human Capital Management module and it is working fine.
(0017477)
sureshbabu   
2009-06-19 12:58   
Tested in the pi context