Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

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

r1893 corrects the script.

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.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.60936 sec.)

We're Hiring!