Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0031712 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Y. DBSourceManager | minor | have not tried | 2015-12-15 10:24 | 2016-03-17 10:55 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | b80096ac8943 | ||||
Projection | none | ETA | none | Target Version | 3.0PR16Q2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0031712: Open dbsourcemanager API to allow enabling/disabling the foreign keys and constraints of particular tables | |||||||
Description | The database replication module needs at times to reload the synchronized tables. When a table is reloaded, it needs to drop its foreign keys and constraints to prevent errors when importing. Currently there are no public methods to do this. In the Platform interface there are methods that do this for the whole database or for a particular dataset, but not one for individual tables. | |||||||
Steps To Reproduce | - | |||||||
Proposed Solution | Add to the org.apache.ddlutils.Platform interface methods to enable and disable foreign keys and constraints for individual tables. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0083731) hgbot (developer) 2016-01-29 14:24 |
Repository: erp/devel/dbsm-main Changeset: 689cf824c775ff478473090d7a0ee1a2f15fa6ab Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Tue Jan 26 10:39:12 2016 +0100 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/689cf824c775ff478473090d7a0ee1a2f15fa6ab [^] Fixes issue 31712: Foreign keys and constraints can be disabled per table Before this change the Platform class only offered methods to disable all the constraints and foreign keys of the whole database. Now it is possible to do it also on a table to table basis. Changes done: - Platform.java: Added public methods disableAllFkForTable, enableAllFkForTable, disableCheckConstraintsForTable, enableCheckConstraintsForTable - PlatformImplBase.java: Provides a functional default implementation for disableCheckConstraintsForTable and enableCheckConstraintsForTable, possible because the .disableAllChecks(table) was already implemented. Also provides an implementation for disableAllFkForTable and enableAllFkForTable that just returns throw new DatabaseOperationException("Error: Operation not supported"), because it needs to be implemented in each specific platform. - Oracle8Platform and PostgreSqlPlatform: Implementations for disableAllFkForTable and enableAllFkForTable. --- M src/org/apache/ddlutils/Platform.java M src/org/apache/ddlutils/platform/PlatformImplBase.java M src/org/apache/ddlutils/platform/oracle/Oracle8Platform.java M src/org/apache/ddlutils/platform/postgresql/PostgreSqlPlatform.java --- |
(0083732) hgbot (developer) 2016-01-29 14:24 |
Repository: erp/devel/dbsm-main Changeset: e14cb01c7638e0ea28aebeae8f34e39c50a92554 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Tue Jan 26 10:41:54 2016 +0100 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/e14cb01c7638e0ea28aebeae8f34e39c50a92554 [^] Related with issue 31712: tests fks and constraints can be disabled and enabled The tests check that the foreign keys and constraints can be disabled and enabled for the whole database and also for a specific table. --- M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java A src-test/model/constraints/TWO_TABLES_WITH_CONSTRAINTS.xml A src-test/model/foreignKeys/TWO_TABLES_WITH_FOREIGN_KEYS.xml A src-test/src/org/openbravo/dbsm/test/model/CheckDisableAndEnableForeignKeysAndConstraints.java --- |
(0083736) hgbot (developer) 2016-01-29 14:32 |
Repository: erp/devel/pi Changeset: b80096ac894321c09bf620700c255fd3ef9f8890 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Fri Jan 29 14:21:19 2016 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/b80096ac894321c09bf620700c255fd3ef9f8890 [^] Fixes issue 31712: Foreign keys and constraints can be disabled per table Before this change the Platform class only offered methods to disable all the constraints and foreign keys of the whole database. Now it is possible to do it also on a table to table basis. Changes done: - Platform.java: Added public methods disableAllFkForTable, enableAllFkForTable, disableCheckConstraintsForTable, enableCheckConstraintsForTable - PlatformImplBase.java: Provides a functional default implementation for disableCheckConstraintsForTable and enableCheckConstraintsForTable, possible because the .disableAllChecks(table) was already implemented. Also provides an implementation for disableAllFkForTable and enableAllFkForTable that just returns throw new DatabaseOperationException("Error: Operation not supported"), because it needs to be implemented in each specific platform. - Oracle8Platform and PostgreSqlPlatform: Implementations for disableAllFkForTable and enableAllFkForTable. Some tests have been added to check that the foreign keys and constraints can be disabled and enabled for the whole database and also for a specific table. --- M src-db/database/lib/dbsourcemanager.jar --- |
(0083950) alostale (viewer) 2016-02-05 09:02 |
code reviewed + tested |
(0085091) hudsonbot (viewer) 2016-03-17 10:55 |
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/b22fb0500156 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2015-12-15 10:24 | AugustoMauch | New Issue | |
2015-12-15 10:24 | AugustoMauch | Assigned To | => AugustoMauch |
2015-12-15 10:24 | AugustoMauch | OBNetwork customer | => No |
2015-12-15 10:24 | AugustoMauch | Modules | => Core |
2015-12-15 10:24 | AugustoMauch | Triggers an Emergency Pack | => No |
2015-12-15 10:25 | AugustoMauch | Status | new => scheduled |
2015-12-15 10:25 | AugustoMauch | Target Version | => 3.0PR16Q2 |
2016-01-04 10:51 | AugustoMauch | Summary | Open dbsourcemanager API to allow enabling/disabling the foreign keys and constraints of particular tables => Open dbsourcemanager API to allow enabling/disabling the foreign keys, triggers and constraints of particular tables |
2016-01-04 10:51 | AugustoMauch | Description Updated | View Revisions |
2016-01-04 10:51 | AugustoMauch | Proposed Solution updated | |
2016-01-25 11:00 | AugustoMauch | Summary | Open dbsourcemanager API to allow enabling/disabling the foreign keys, triggers and constraints of particular tables => Open dbsourcemanager API to allow enabling/disabling the foreign keys and constraints of particular tables |
2016-01-25 11:01 | AugustoMauch | Description Updated | View Revisions |
2016-01-25 11:01 | AugustoMauch | Proposed Solution updated | |
2016-01-29 14:17 | AugustoMauch | Review Assigned To | => alostale |
2016-01-29 14:24 | hgbot | Checkin | |
2016-01-29 14:24 | hgbot | Note Added: 0083731 | |
2016-01-29 14:24 | hgbot | Status | scheduled => resolved |
2016-01-29 14:24 | hgbot | Resolution | open => fixed |
2016-01-29 14:24 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/689cf824c775ff478473090d7a0ee1a2f15fa6ab [^] |
2016-01-29 14:24 | hgbot | Checkin | |
2016-01-29 14:24 | hgbot | Note Added: 0083732 | |
2016-01-29 14:32 | hgbot | Checkin | |
2016-01-29 14:32 | hgbot | Note Added: 0083736 | |
2016-01-29 14:32 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/689cf824c775ff478473090d7a0ee1a2f15fa6ab [^] => http://code.openbravo.com/erp/devel/pi/rev/b80096ac894321c09bf620700c255fd3ef9f8890 [^] |
2016-02-05 09:02 | alostale | Note Added: 0083950 | |
2016-02-05 09:02 | alostale | Status | resolved => closed |
2016-02-05 09:02 | alostale | Fixed in Version | => 3.0PR16Q2 |
2016-03-17 10:55 | hudsonbot | Checkin | |
2016-03-17 10:55 | hudsonbot | Note Added: 0085091 | |
2016-03-30 18:26 | AugustoMauch | Relationship added | related to 0032553 |
Copyright © 2000 - 2009 MantisBT Group |