Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012514Openbravo ERPY. DBSourceManagerpublic2010-03-01 18:162011-03-03 09:35
marvintm 
marvintm 
urgentmajoralways
closedfixed 
5
 
2.50MP14 
Core
No
0012514: Functions which depend on a view cannot be modified by update.database
When a function depends on a view, if the function is changed, currently dbsourcemanager tries to drop it and create it again. This doesn't work in case there are views which depend on it.
Modify function C_CURRENCY_CONVERT in its XML file, and try to do update.database on PostgreSQL. You will get several errors, and the function will be unchanged in the database
DBSM needs to be changed to address this problem. A DROP statement is not needed in this case, a CREATE OR REPLACE statement should be enough.
No tags attached.
Issue History
2010-03-01 18:16marvintmNew Issue
2010-03-01 18:16marvintmAssigned To => marvintm
2010-03-01 18:22hgbotCheckin
2010-03-01 18:22hgbotNote Added: 0024921
2010-03-01 18:22hgbotStatusnew => resolved
2010-03-01 18:22hgbotResolutionopen => fixed
2010-03-01 18:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/163ea059a64417a8fa5f5b738dadb7214d470bbb [^]
2010-03-03 11:52hgbotCheckin
2010-03-03 11:52hgbotNote Added: 0024991
2010-03-09 19:50shuehnerNote Added: 0025192
2010-03-09 19:50shuehnerStatusresolved => closed
2010-03-09 19:50shuehnerFixed in Version => 2.50MP14
2010-03-10 17:25anonymoussf_bug_id0 =>
2010-03-10 18:30anonymoussf_bug_id => 2968118
2010-03-12 22:40hudsonbotCheckin
2010-03-12 22:40hudsonbotNote Added: 0025368
2010-03-12 22:40hudsonbotCheckin
2010-03-12 22:40hudsonbotNote Added: 0025380
2011-03-03 09:35hgbotCheckin
2011-03-03 09:35hgbotNote Added: 0034521
2011-03-03 09:35hgbotCheckin
2011-03-03 09:35hgbotNote Added: 0034523

Notes
(0024921)
hgbot   
2010-03-01 18:22   
Repository: erp/devel/pi
Changeset: 163ea059a64417a8fa5f5b738dadb7214d470bbb
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Mar 01 18:25:17 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/163ea059a64417a8fa5f5b738dadb7214d470bbb [^]

Fixed issue 12514. A DROP statement will not be executed. Instead, a CREATE OR REPLACE will be executed when a function has been changed.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0024991)
hgbot   
2010-03-03 11:52   
Repository: erp/devel/pi
Changeset: 48db27e1e732443e1803c51f40c12c2f45f12f1f
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Mar 03 11:55:19 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/48db27e1e732443e1803c51f40c12c2f45f12f1f [^]

Related to issue 12514. This will also be done in Oracle (because the ModelComparator is not platform specific

---
M src-db/database/lib/dbsourcemanager.jar
---
(0025192)
shuehner   
2010-03-09 19:50   
Tested on pi (rev 2b0ab921b30a) / pgsql 8.4 . Function is changed correctly in the database without errors
(0025368)
hudsonbot   
2010-03-12 22:40   
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/163ea059a644 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0025380)
hudsonbot   
2010-03-12 22:40   
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/48db27e1e732 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0034521)
hgbot   
2011-03-03 09:35   
Repository: erp/devel/dbsm-main
Changeset: ee9961cbd2e3ba238fdfa7568722eae18bd9e33c
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Mar 03 09:31:18 2011 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/ee9961cbd2e3ba238fdfa7568722eae18bd9e33c [^]

Fixed issue 16084. The following changes have been made:
- To avoid the problem described in the issue, when a function has changed, it will be dropped and then created again.
- Then, to avoid the problem described in issue 12514, views will be dropped before doing any change, so that functions can then be dropped safely.
- In addition to these changes, a change in the way the error log is shown has been made, so that a forced command that fails will only be shown when the main loop of forced commands has finished, and there are still forced commands to be executed.

---
M src/org/apache/ddlutils/alteration/ModelComparator.java
M src/org/apache/ddlutils/platform/PlatformImplBase.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
---
(0034523)
hgbot   
2011-03-03 09:35   
Repository: erp/devel/pi
Changeset: 1e390dd8d3994be8f82913ea015aeab79a3c8aad
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Mar 03 09:34:32 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1e390dd8d3994be8f82913ea015aeab79a3c8aad [^]

Fixed issue 16084. The following changes have been made:
> - To avoid the problem described in the issue, when a function has changed, it will be dropped and then created again.
> - Then, to avoid the problem described in issue 12514, views will be dropped before doing any change, so that functions can then be dropped safely.
> - In addition to these changes, a change in the way the error log is shown has been made, so that a forced command that fails will only be shown when the main loop of forced commands has finished, and there are still forced commands to be executed.

---
M src-db/database/lib/dbsourcemanager.jar
---