Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0000469Openbravo ERPY. DBSourceManagerpublic2008-05-29 10:012009-03-18 11:02
jpabloae 
marvintm 
normalmajoralways
closedfixed 
30Gentoo - 2.6.24
 
 
Core
No
0000469: Constraints consistency not checked in update.database with PostgreSQL
Currently the "ant update.database" task does not maintain the sampledata consistency. So that if an ID is deleted in sourcedata and there are records in sampledata referencing that ID, it doesn't raise an error and there are inconsistent records in the database. In oracle it raises an error, see 0000468.

Ideally, it should give an error when there's a invalid constraint.

1. Delete an AD_PROCESS_ID in AD_PROCESS.xml in sourcedata.
2. Make sure there's a record in sampledata/AD_PROCESS_ACCESS.xml referencing that deleted AD_PROCESS_ID.
3. Run "ant update.database".

It doesn't fail, and currently it should.
dbsm_migrate
related to defect 0000468 closed marvintm Sampledata consistency not kept in update.database 
Issue History
2008-05-29 10:01jpabloaeNew Issue
2008-05-29 10:01jpabloaeRelationship addedrelated to 0000468
2008-06-16 15:36svnbotCheckin
2008-06-16 15:36svnbotNote Added: 0007741
2008-06-16 15:36svnbotStatusnew => resolved
2008-06-16 15:36svnbotResolutionopen => fixed
2008-06-16 15:36svnbotsvn_revision => 74
2008-11-26 13:37psarobeStatusresolved => closed
2008-11-28 12:54jpabloaeAssigned To => marvintm
2008-12-18 12:38jpabloaeSticky IssueNo => Yes
2008-12-18 12:39jpabloaeSticky IssueYes => No
2008-12-18 12:39jpabloaeTag Attached: dbsm_migrate
2008-12-18 12:41jpabloaeProject@4@ => Openbravo ERP
2008-12-18 12:41jpabloaeCategory => Y. DBSourceManager
2009-03-18 11:02anonymoussf_bug_id0 => 2691318

Notes
(0007741)
svnbot   
2008-06-16 15:36   
Repository: dbsourcemanager
Revision: 74
Author: marvintm
Date: 2008-06-16 15:36:00 +0200 (Mon, 16 Jun 2008)

Fixed bug 0000469 Now error messages will be shown in PostgreSQL if XML data prevents a constraint from being activated (specifically, if a row contains a reference to another row which doesn't exist ie. a foreign key is invalid).

---
U trunk/src/org/apache/ddlutils/io/DataToDatabaseSink.java
U trunk/src/org/apache/ddlutils/platform/SqlBuilder.java
U trunk/src/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
U trunk/src/org/apache/ddlutils/platform/postgresql/PostgreSqlPlatform.java
---

https://dev.openbravo.com/websvn/dbsourcemanager/?rev=74&sc=1 [^]