Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0004759Openbravo ERPY. DBSourceManagerpublic2008-08-29 12:192009-03-18 11:02
marvintm 
marvintm 
highmajoralways
closedfixed 
5
 
 
Core
No
0004759: OnCreateDefault statements are not correct if the table wasn't recreated by the upgrader
During the upgrade process, if a column is new and has an onCreateDefault statement, that statement will be constructed and executed.

The problem is that the way it is constructed now depends on the table of the column being recreated by the upgrader. If it is not, the statement will fail.

This problem currently only happens in Oracle, as in PostgreSQL the tables are recreated if a new column has been added.
Just add a new column to the end of a table in an table XML file, assign an onCreateDefault statement to it, and execute an update.database process, in an Oracle database.
The onCreateDefault statement has to be constructed differently for tables that have been not recreated.
dbsm_migrate
Issue History
2008-08-29 12:19marvintmNew Issue
2008-08-29 12:19marvintmAssigned To => marvintm
2008-08-29 12:21svnbotCheckin
2008-08-29 12:21svnbotNote Added: 0008782
2008-08-29 12:21svnbotStatusnew => resolved
2008-08-29 12:21svnbotResolutionopen => fixed
2008-08-29 12:21svnbotsvn_revision => 115
2008-08-29 12:23svnbotCheckin
2008-08-29 12:23svnbotNote Added: 0008783
2008-08-29 12:23svnbotsvn_revision115 => 116
2008-12-15 19:00psarobeStatusresolved => closed
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 => 2691348

Notes
(0008782)
svnbot   
2008-08-29 12:21   
Repository: dbsourcemanager
Revision: 115
Author: marvintm
Date: 2008-08-29 12:21:18 +0200 (Fri, 29 Aug 2008)

Fixed bug 4759. Now onCreateDefault statements will be constructed differently if the table wasn't recreated by the upgrader process.

---
U branches/r0.8x/src/org/apache/ddlutils/platform/SqlBuilder.java
U branches/r0.8x/src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
---

https://dev.openbravo.com/websvn/dbsourcemanager/?rev=115&sc=1 [^]
(0008783)
svnbot   
2008-08-29 12:23   
Repository: dbsourcemanager
Revision: 116
Author: marvintm
Date: 2008-08-29 12:23:39 +0200 (Fri, 29 Aug 2008)

Backport of bug 4759.. Now onCreateDefault statements will be constructed differently if the table wasn't recreated by the upgrader process.

---
_U trunk/
U trunk/src/org/apache/ddlutils/platform/SqlBuilder.java
U trunk/src/org/apache/ddlutils/platform/oracle/Oracle8Builder.java
---

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