Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007068Openbravo ERPY. DBSourceManagerpublic2009-01-21 19:582023-09-22 12:08
shuehner 
marvintm 
normalmajorhave not tried
closedfixed 
5
pi 
 
Core
No
0007068: update.database fails on postgres when updating accross 12107
Commit 12107 did remove the AD_TAB entry for the tab with the name 'Period Control' and in the same commit add a new record for a tab with the same name 'Period Control' but a different uuid.
When updating postgres shows the error message:

Executed 414 SQL command(s) with 0 error(s)
Model update complete.
Disabling foreign keys
Executed 0 SQL command(s) with 0 error(s)
Disabling triggers
Executed 408 SQL command(s) with 0 error(s)
Updating database data...
Error while inserting into the database: ERROR: duplicate key value violates unique constraint "ad_tab_window_name_unique"
[alterdatabasedataall] org.apache.ddlutils.DatabaseOperationException: Error while inserting into the database: ERROR: duplicate key value violates unique constraint "ad_tab_window_name_unique"
[alterdatabasedataall] at org.apache.ddlutils.platform.PlatformImplBase.insert(PlatformImplBase.java:1557)
Check ordering of statements in update.database
if not solvable in dbsm revert 12107 and commit it in two steps and advice all developers about the limitation.
No tags attached.
Issue History
2009-01-21 19:58shuehnerNew Issue
2009-01-21 19:58shuehnerAssigned To => marvintm
2009-01-21 19:58shuehnersf_bug_id0 => 2526785
2009-01-21 19:58shuehnerRegression testing => No
2009-01-21 20:12shuehnerNote Added: 0012490
2009-01-22 12:45svnbotCheckin
2009-01-22 12:45svnbotNote Added: 0012523
2009-01-22 12:45svnbotStatusnew => resolved
2009-01-22 12:45svnbotResolutionopen => fixed
2009-01-22 12:45svnbotsvn_revision => 214
2009-01-22 12:46svnbotCheckin
2009-01-22 12:46svnbotNote Added: 0012524
2009-01-22 12:46svnbotsvn_revision214 => 12153
2009-01-22 19:18svnbotCheckin
2009-01-22 19:18svnbotNote Added: 0012539
2009-01-22 19:18svnbotsvn_revision12153 => 12166
2009-04-21 11:05psarobeStatusresolved => closed
2023-09-15 12:55hgbotNote Added: 0154898
2023-09-21 12:05hgbotNote Added: 0155092
2023-09-21 12:05hgbotNote Added: 0155097
2023-09-21 13:12hgbotNote Added: 0155105
2023-09-22 08:40igor_trebolNote Deleted: 0155105
2023-09-22 08:40igor_trebolNote Deleted: 0155097
2023-09-22 08:40igor_trebolNote Deleted: 0155092
2023-09-22 08:40igor_trebolNote Deleted: 0154898
2023-09-22 12:08hgbotNote Added: 0155174
2023-09-29 10:57igor_trebolNote Deleted: 0155174

Notes
(0012490)
shuehner   
2009-01-21 20:12   
As a workaround a "delete from ad_tab where name = 'Period Control' and update.database afterwards does work for me.

I suppose that dbsm does first try to insert the new Ad_tab entry and does delete the old on in a different commit afterwards.
(0012523)
svnbot   
2009-01-22 12:45   
Repository: dbsourcemanager
Revision: 214
Author: marvintm
Date: 2009-01-22 12:45:52 +0100 (Thu, 22 Jan 2009)

Fixed issue 7068. Now data changes are ordered before being executed (RemoveRowChanges come first, then ColumnDataChanges, then finally AddRowChanges)

---
U trunk/src/org/apache/ddlutils/alteration/DataComparator.java
---

https://dev.openbravo.com/websvn/dbsourcemanager/?rev=214&sc=1 [^]
(0012524)
svnbot   
2009-01-22 12:46   
Repository: openbravo
Revision: 12153
Author: marvintm
Date: 2009-01-22 12:46:14 +0100 (Thu, 22 Jan 2009)

Fixed issue 7068. Now data changes are ordered before being executed (RemoveRowChanges come first, then ColumnDataChanges, then finally AddRowChanges)

---
U trunk/src-db/database/lib/dbsourcemanager.jar
---

https://dev.openbravo.com/websvn/openbravo/?rev=12153&sc=1 [^]
(0012539)
svnbot   
2009-01-22 19:18   
Repository: openbravo
Revision: 12166
Author: marvintm
Date: 2009-01-22 19:18:28 +0100 (Thu, 22 Jan 2009)

Hopefully finally fixed the issue 7068.

---
U trunk/src-db/database/lib/dbsourcemanager.jar
---

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