Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032553Openbravo ERPY. DBSourceManagerpublic2016-03-29 18:322016-06-17 19:36
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
3.0PR16Q3 
alostale
Core
No
0032553: It is not possible to reenable the constraints of a given table
The platform.enableCheckConstraintsForTable does not work properly. Instead of enabling the constraints for a table is trying to disable them, see [1]

[1] https://code.openbravo.com/erp/devel/dbsm-main/file/c204e6f0767c/src/org/apache/ddlutils/platform/PlatformImplBase.java#l3246 [^]
Apply the attached test. It tries to reenable a constraint for a table after having disabled it previously. The test will fail.
No tags attached.
related to defect 00317123.0PR16Q2 closed AugustoMauch Open dbsourcemanager API to allow enabling/disabling the foreign keys and constraints of particular tables 
diff updatedConstraintsTest.diff (2,986) 2016-03-29 18:32
https://issues.openbravo.com/file_download.php?file_id=9215&type=bug
Issue History
2016-03-29 18:32AugustoMauchNew Issue
2016-03-29 18:32AugustoMauchAssigned To => platform
2016-03-29 18:32AugustoMauchFile Added: updatedConstraintsTest.diff
2016-03-29 18:32AugustoMauchModules => Core
2016-03-29 18:32AugustoMauchTriggers an Emergency Pack => No
2016-03-30 18:26AugustoMauchRelationship addedrelated to 0031712
2016-04-01 10:11hgbotCheckin
2016-04-01 10:11hgbotNote Added: 0085377
2016-04-01 10:11hgbotStatusnew => resolved
2016-04-01 10:11hgbotResolutionopen => fixed
2016-04-01 10:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/611bc1bc6cc344eef14ce4a7e7c9e1c8ee137d32 [^]
2016-04-01 10:11hgbotCheckin
2016-04-01 10:11hgbotNote Added: 0085378
2016-04-01 10:11hgbotCheckin
2016-04-01 10:11hgbotNote Added: 0085379
2016-04-01 10:11hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/611bc1bc6cc344eef14ce4a7e7c9e1c8ee137d32 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/96d9d8727cceed7b550a7b34135dcf222433d218 [^]
2016-04-01 10:12hgbotCheckin
2016-04-01 10:12hgbotNote Added: 0085380
2016-04-01 10:12hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/96d9d8727cceed7b550a7b34135dcf222433d218 [^] => http://code.openbravo.com/erp/devel/pi/rev/99d84ea327923b606999c2401d7e807d7553c929 [^]
2016-04-08 07:41alostaleAssigned Toplatform => AugustoMauch
2016-04-08 07:41alostaleReview Assigned To => alostale
2016-04-08 07:47alostaleNote Added: 0085506
2016-04-08 07:47alostaleStatusresolved => closed
2016-04-08 07:47alostaleFixed in Version => 3.0PR16Q3
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087411

Notes
(0085377)
hgbot   
2016-04-01 10:11   
Repository: erp/devel/dbsm-main
Changeset: 611bc1bc6cc344eef14ce4a7e7c9e1c8ee137d32
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 30 18:25:32 2016 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/611bc1bc6cc344eef14ce4a7e7c9e1c8ee137d32 [^]

Fixes issue 32553: Constraints can be reenabled for a given table

The method PlatformImplBase.enableCheckConstraintsForTable was not implemented properly, as it was trying to disable the constraints of a table instead of to enable it.

---
M src/org/apache/ddlutils/platform/PlatformImplBase.java
---
(0085378)
hgbot   
2016-04-01 10:11   
Repository: erp/devel/dbsm-main
Changeset: 3ef6ae02d6c9860f26a5bf047eab0b291285deaa
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Mar 30 18:28:27 2016 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3ef6ae02d6c9860f26a5bf047eab0b291285deaa [^]

Related with issue 32553: Adds test that reenables the constraints of a table

The tests that where included with the issue [1] did not catch the current easy because they just disabled the constraints and foreign keys of tables, but they did not try to reenable them.

This changeset adds test to reenable the constraints and foreign keys of tables after having disabled them.

[1] https://issues.openbravo.com/view.php?id=31712 [^]

---
M src-test/src/org/openbravo/dbsm/test/model/CheckDisableAndEnableForeignKeysAndConstraints.java
---
(0085379)
hgbot   
2016-04-01 10:11   
Repository: erp/devel/dbsm-main
Changeset: 96d9d8727cceed7b550a7b34135dcf222433d218
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 31 09:30:15 2016 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/96d9d8727cceed7b550a7b34135dcf222433d218 [^]

Fixes issue 32553: Implements enableAllFkForTable in Oracle8Platform

The enableAllFkForTable method was only defined in PostgreSqlPlatform, it should also be defined in enableAllFkForTable.

---
M src/org/apache/ddlutils/platform/oracle/Oracle8Platform.java
---
(0085380)
hgbot   
2016-04-01 10:12   
Repository: erp/devel/pi
Changeset: 99d84ea327923b606999c2401d7e807d7553c929
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Apr 01 10:08:39 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/99d84ea327923b606999c2401d7e807d7553c929 [^]

Fixes issue 32553: Constraints and fks can be reenabled for a given table

The method PlatformImplBase.enableCheckConstraintsForTable was not implemented properly, as it was trying to disable the constraints of a table instead of to enable it.

Also the enableAllFkForTable method was only defined in PostgreSqlPlatform, it should also be defined in enableAllFkForTable.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0085506)
alostale   
2016-04-08 07:47   
code reviewed + tested
(0087411)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test