Bug #822 (closed)
Opened 16 years ago
Closed 16 years ago
DB upgrade script corrupts data
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | blocker | Cc: | cxallan |
Sprint: | n.a. | ||
Total Remaining Time: | n.a. |
Description
The OMERO3__5__OMERO3__6 updated script introduced in r1866 corrupts data with rounding errors while widening from float4 ("real") to float8 ("double precision"). This happens when the widening occurs so:
alter table X alter column Y TYPE float 8;
Instead, the update has to happen via numeric thus:
alter table X add column tmp_Y double precision; update X set tmp_Y = (Y::numeric)::float8; alter table X drop column Y; alter table X rename tmp_Y to Y;
Change History (2)
comment:1 Changed 16 years ago by jmoore
comment:2 Changed 16 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
Closing this ticket since the script is no longer dangerous (nor required). #803 has been pushed to milestone:3.0-Beta3 for more testing.
r1893 corrects the script.