Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012603
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajorhave not tried2010-03-09 11:212010-03-13 00:00
ReportermarvintmView Statuspublic 
Assigned Tomarvintm 
PriorityurgentResolutionfixedFixed in Version2.50MP14
StatusclosedFix in branchFixed in SCM revisionb7add0e35b05
ProjectionnoneETAnoneTarget Version2.50MP14
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0012603: When update.database tries to add a column to a table, if the column is mandatory and doesn't have a default, data can be lost

DescriptionWhen update.database tries to add a mandatory column to an existing table, and the column doesn't have an oncreatedefault or default defined for it, the table will be created correctly, but the original data will be lost.
Steps To Reproduce- Add a mandatory column to the XML file of a table. Do not define a default value, or oncreate default.
- Do update.database
- The new table will have the column, but it will be empty.
Proposed SolutionDBSM will be changed so that the data is not lost, although the constraint will not be activated in this case (so, still an error, but at least the data is not lost).
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0025237)
hgbot (developer)
2010-03-11 11:12

Repository: erp/devel/pi
Changeset: b7add0e35b053daa500c9374e5096b7ea2db943f
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Mar 11 11:17:14 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b7add0e35b053daa500c9374e5096b7ea2db943f [^]

Fixed issue 12603. NOT NULL constraints will not be active when copying data from the temporary table to the final one, when a table is recreated. This will ensure that even if the column definition is incorrect (ex. if it's mandatory, but doesn't have a default or onCreateDefault value), the data is not lost.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0025427)
hudsonbot (developer)
2010-03-12 22:41

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/b7add0e35b05 [^]
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 [^]

- Issue History
Date Modified Username Field Change
2010-03-09 11:21 marvintm New Issue
2010-03-09 11:21 marvintm Assigned To => marvintm
2010-03-11 10:02 marvintm Target Version => 2.50MP14
2010-03-11 11:12 hgbot Checkin
2010-03-11 11:12 hgbot Note Added: 0025237
2010-03-11 11:12 hgbot Status new => resolved
2010-03-11 11:12 hgbot Resolution open => fixed
2010-03-11 11:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b7add0e35b053daa500c9374e5096b7ea2db943f [^]
2010-03-12 16:03 alostale Status resolved => closed
2010-03-12 16:03 alostale Fixed in Version => 2.50MP14
2010-03-12 22:41 hudsonbot Checkin
2010-03-12 22:41 hudsonbot Note Added: 0025427
2010-03-13 00:00 anonymous sf_bug_id 0 => 2969677


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker