Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020592Openbravo ERPY. DBSourceManagerpublic2012-05-23 15:232012-05-30 18:13
marvintm 
marvintm 
urgentmajorhave not tried
closedfixed 
5
 
3.0MP12 
Core
No
0020592: Update.database should fail if a foreign key or trigger is not correctly activated
Currently, update.database shows a warning if a foreign key or trigger cannot be activated, but nevertheless finishes successfully.

This can create a false "feeling of safeness", as the user usually doesn't worry about warnings, and specially in the case of triggers this can cause serious problems in the functionality of the application.

Therefore, update.database should fail if a foreign key or trigger cannot be activated, to force the user to fix the problem.
- Modify a trigger XML file, setting it to an incorrect value.
- Execute update.database. Notice that a warning is shown, but that the process finishes successfully.
The update.database process will now stop if a foreign key or trigger couldn't be activated.
No tags attached.
Issue History
2012-05-23 15:23marvintmNew Issue
2012-05-23 15:23marvintmAssigned To => marvintm
2012-05-23 15:23marvintmModules => Core
2012-05-28 15:44hgbotCheckin
2012-05-28 15:44hgbotNote Added: 0049372
2012-05-28 15:44hgbotStatusnew => resolved
2012-05-28 15:44hgbotResolutionopen => fixed
2012-05-28 15:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/a6a6f4d9ea32ffea2a7301351660730781cac4c9 [^]
2012-05-28 17:54hgbotCheckin
2012-05-28 17:54hgbotNote Added: 0049380
2012-05-28 17:54hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/a6a6f4d9ea32ffea2a7301351660730781cac4c9 [^] => http://code.openbravo.com/erp/devel/pi/rev/2f1eca1d8609f493276b969c2733b49463fbc705 [^]
2012-05-29 08:39alostaleNote Added: 0049395
2012-05-29 08:39alostaleStatusresolved => closed
2012-05-29 08:39alostaleFixed in Version => 3.0MP12
2012-05-29 10:52hgbotCheckin
2012-05-29 10:52hgbotNote Added: 0049414
2012-05-29 10:53hgbotCheckin
2012-05-29 10:53hgbotNote Added: 0049415
2012-05-30 18:13hudsonbotCheckin
2012-05-30 18:13hudsonbotNote Added: 0049498
2012-05-30 18:13hudsonbotCheckin
2012-05-30 18:13hudsonbotNote Added: 0049505

Notes
(0049372)
hgbot   
2012-05-28 15:44   
Repository: erp/devel/dbsm-main
Changeset: a6a6f4d9ea32ffea2a7301351660730781cac4c9
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon May 28 15:44:10 2012 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/a6a6f4d9ea32ffea2a7301351660730781cac4c9 [^]

Fixed issue 20591. Fixed issue 20592. Several changes have been made:
- The table creation commands are now considered 'critical'. This means that the process will fail automatically, with an specific message, if one of these commands fails.
- The create fks and triggers methods now return whether there were errors or not during the execution.
- This new boolean is now used by update.database to make the process fail in the end, if some trigger or foreign key was not correctly enabled. This failure is a normal exception which will be detected by the rebuild window as an error in the process.
- Additionally (and unrelated to these issues actually) a new convenient method to load a basic database model which includes only tables has been included.

---
M src/org/apache/ddlutils/Platform.java
M src/org/apache/ddlutils/platform/PlatformImplBase.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/Oracle8Platform.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlPlatform.java
M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0049380)
hgbot   
2012-05-28 17:54   
Repository: erp/devel/pi
Changeset: 2f1eca1d8609f493276b969c2733b49463fbc705
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon May 28 17:31:44 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2f1eca1d8609f493276b969c2733b49463fbc705 [^]

Fixed issue 20591. Fixed issue 20592. Several changes have been made:
> - The table creation commands are now considered 'critical'. This means that the process will fail automatically, with an specific message, if one of these commands fails.
> - The create fks and triggers methods now return whether there were errors or not during the execution.
> - This new boolean is now used by update.database to make the process fail in the end, if some trigger or foreign key was not correctly enabled. This failure is a normal exception which will be detected by the rebuild window as an error in the process.
> - Additionally (and unrelated to these issues actually) a new convenient method to load a basic database model which includes only tables has been included.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0049395)
alostale   
2012-05-29 08:39   
code reviewed and verified on pi@0ed463f70606
(0049414)
hgbot   
2012-05-29 10:52   
Repository: erp/devel/dbsm-main
Changeset: 8a0da38103c4e5a45bc21c50d004f0c64700ecaa
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue May 29 10:51:49 2012 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/8a0da38103c4e5a45bc21c50d004f0c64700ecaa [^]

Related to issue 20592. Execute postscript and crc update even if there is a problem in a fk or trigger.

---
M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
---
(0049415)
hgbot   
2012-05-29 10:53   
Repository: erp/devel/pi
Changeset: 1554cc80c7f8cab5830d37366fe8267d71de9c10
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue May 29 10:52:46 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1554cc80c7f8cab5830d37366fe8267d71de9c10 [^]

Related to issue 20592. Execute postscript and crc update even if there is a problem in a fk or trigger.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0049498)
hudsonbot   
2012-05-30 18:13   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/3752a665362c [^]

Maturity status: Test
(0049505)
hudsonbot   
2012-05-30 18:13   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/3752a665362c [^]

Maturity status: Test