Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011907Openbravo ERPA. Platformpublic2010-01-07 17:002011-09-07 12:41
mtaal 
mtaal 
normalminorhave not tried
closedno change required 
5
pi 
pi 
Core
No
0011907: Add checks to database validation and change length check
In the database validation the check for the column length for a foreign key column with a referenced property on the other side checks the database column length of one side with the field length of the other side. The database column lengths should be compared with eachother.

There should be a check which checks if the fieldlength and the database column lengths are the same.
No tags attached.
Issue History
2010-01-07 17:00mtaalNew Issue
2010-01-07 17:00mtaalAssigned To => mtaal
2010-01-07 17:12azabaletaIssue Monitored: azabaleta
2010-01-19 09:44alostaleStatusnew => scheduled
2010-01-19 09:44alostalefix_in_branch => pi
2010-01-19 20:25mtaalNote Added: 0023578
2010-01-19 20:28hgbotCheckin
2010-01-19 20:28hgbotNote Added: 0023579
2010-01-19 20:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8b6fa3bb0b95cdbd2a4d4cc7ea1c3de4030d9500 [^]
2010-01-20 23:26hudsonbotCheckin
2010-01-20 23:26hudsonbotNote Added: 0023680
2011-09-07 12:41mtaalTypedefect => feature request
2011-09-07 12:41mtaalfix_in_branchpi =>
2011-09-07 12:41mtaalStatusscheduled => closed
2011-09-07 12:41mtaalResolutionopen => no change required

Notes
(0023578)
mtaal   
2010-01-19 20:25   
After some further analysis:
- checking the actual db column length of the referenced column is not possible in the current structure. In the program only the table schema of the tables belonging to the module which is being checked are loaded.
- I also tried a check of the difference between fieldlength and the dbcolumn length. There were currently to many exceptional cases. So for now I disabled this check until it becomes relevant again.

For now I improved the error message so that it is more clear. Keeping this issue open until it pops again.

gr. Martin
(0023579)
hgbot   
2010-01-19 20:28   
Repository: erp/devel/pi
Changeset: 8b6fa3bb0b95cdbd2a4d4cc7ea1c3de4030d9500
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Jan 19 20:27:29 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8b6fa3bb0b95cdbd2a4d4cc7ea1c3de4030d9500 [^]

Improved log message and updated test case, related to issue 11907

---
M src-test/org/openbravo/test/system/SystemValidatorTest.java
M src/org/openbravo/service/system/DatabaseValidator.java
---
(0023680)
hudsonbot   
2010-01-20 23:26   
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/8b6fa3bb0b95 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]