Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012785Openbravo ERPY. DBSourceManagerpublic2010-03-24 09:412010-05-19 00:00
marvintm 
marvintm 
urgentmajorhave not tried
closedfixed 
5
 
2.50MP17 
Core
No
0012785: If a module adds a table to the dataset AD, constraints for that table are dropped and created twice
If a module adds a table to the dataset AD, constraints for that table are dropped and created twice. This produces warnings like the following:
 SQL Command failed with: ERROR: constraint "obuisel_s_ad_client" does not exist
     [java] 96000 WARN - ALTER TABLE OBUISEL_SELECTOR
     [java] DROP CONSTRAINT OBUISEL_S_AD_CLIENT
     [java] 96003 WARN - SQL Command failed with: ERROR: constraint "obuisel_s_ad_column" does not exist
     [java] 96006 WARN - -- END
     [java] ALTER TABLE OBUISEL_SELECTOR
     [java] DROP CONSTRAINT OBUISEL_S_AD_COLUMN
     [java] 96010 WARN - SQL Command failed with: ERROR: constraint "obuisel_s_ad_module" does not exist
     [java] 96014 WARN - -- END
     [java] ALTER TABLE OBUISEL_SELECTOR
     [java] DROP CONSTRAINT OBUISEL_S_AD_MODULE
     [java] 96017 WARN - SQL Command failed with: ERROR: constraint "obuisel_s_ad_org" does not exist
     [java] 96022 WARN - -- END

------

SQL Command failed with: ERROR: constraint "obuisel_s_ad_client" for relation "obuisel_selector" already exists
     [java] 155894 WARN - ALTER TABLE OBUISEL_SELECTOR
     [java] ADD CONSTRAINT OBUISEL_S_AD_CLIENT FOREIGN KEY (AD_CLIENT_ID) REFERENCES AD_CLIENT (AD_CLIENT_ID)
     [java] 155897 WARN - SQL Command failed with: ERROR: constraint "obuisel_s_ad_column" for relation "obuisel_selector" already exists
     [java] 155899 WARN - -- END
     [java] ALTER TABLE OBUISEL_SELECTOR
     [java] ADD CONSTRAINT OBUISEL_S_AD_COLUMN FOREIGN KEY (AD_COLUMN_ID) REFERENCES AD_COLUMN (AD_COLUMN_ID)
     [java] 155904 WARN - SQL Command failed with: ERROR: constraint "obuisel_s_ad_module" for relation "obuisel_selector" already exists
     [java] 155906 WARN - -- END
     [java] ALTER TABLE OBUISEL_SELECTOR
     [java] ADD CONSTRAINT OBUISEL_S_AD_MODULE FOREIGN KEY (AD_MODULE_ID) REFERENCES AD_MODULE (AD_MODULE_ID)
     [java] 155910 WARN - SQL Command failed with: ERROR: constraint "obuisel_s_ad_org" for relation "obuisel_selector" already exists
     [java] 155913 WARN - -- END
Apply the new Selectors module. Look at the log.
DBSourceManager needs to be changed to fix this.
No tags attached.
has duplicate defect 0013464 closed marvintm Scary warnings after installing the new Adv payables&Receivables module 
Issue History
2010-03-24 09:41marvintmNew Issue
2010-03-24 09:41marvintmAssigned To => marvintm
2010-03-29 08:21alostaleStatusnew => scheduled
2010-03-29 08:21alostalefix_in_branch => pi
2010-04-13 18:24shuehnerIssue Monitored: shuehner
2010-05-12 16:44hgbotCheckin
2010-05-12 16:44hgbotNote Added: 0027174
2010-05-12 16:44hgbotStatusscheduled => resolved
2010-05-12 16:44hgbotResolutionopen => fixed
2010-05-12 16:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/04bd4e0ce0c5916bd7a5d319347630257a348163 [^]
2010-05-12 16:44hgbotCheckin
2010-05-12 16:44hgbotNote Added: 0027175
2010-05-12 16:44hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/04bd4e0ce0c5916bd7a5d319347630257a348163 [^] => http://code.openbravo.com/erp/devel/pi/rev/37e4d8da2514a907cfa1b9c58f2825f737e04ccc [^]
2010-05-18 11:22mtaalNote Added: 0027407
2010-05-18 11:22mtaalStatusresolved => closed
2010-05-18 11:22mtaalFixed in Version => 2.50MP17
2010-05-18 21:44hudsonbotCheckin
2010-05-18 21:44hudsonbotNote Added: 0027518
2010-05-19 00:00anonymoussf_bug_id0 => 3003671
2010-05-27 19:32marvintmRelationship addedhas duplicate 0013464

Notes
(0027174)
hgbot   
2010-05-12 16:44   
Repository: erp/devel/dbsm-main
Changeset: 04bd4e0ce0c5916bd7a5d319347630257a348163
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed May 12 16:43:50 2010 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/04bd4e0ce0c5916bd7a5d319347630257a348163 [^]

Fixed issue 12785. Foreign key constraints will not be dropped and created twice when they belong to a table which a module adds and is part of the AD dataset.

---
M src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java
---
(0027175)
hgbot   
2010-05-12 16:44   
Repository: erp/devel/pi
Changeset: 37e4d8da2514a907cfa1b9c58f2825f737e04ccc
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed May 12 16:44:09 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/37e4d8da2514a907cfa1b9c58f2825f737e04ccc [^]

Fixed issue 12785. Foreign key constraints will not be dropped and created twice when they belong to a table which a module adds and is part of the AD dataset.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0027407)
mtaal   
2010-05-18 11:22   
Tested works fine
(0027518)
hudsonbot   
2010-05-18 21:44   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/37e4d8da2514 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]