Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1648 closed defect (fixed)

Upgrading from BASE 2 to BASE 3 may create duplicate file set members

Reported by: Nicklas Nordborg Owned by: everyone
Priority: blocker Milestone: BASE 3.0.1
Component: install Version:
Keywords: Cc:


The upgrade will move all existing Image:s that has been added to a Scan into a FileSet as FileSetMember entries. In BASE 2 it is possible to have more than one image that points to the same file, but in BASE 3 this should not be possible. In a fresh BASE 3 installation this will never happen since there is a UNIQUE constraint on the (fileset_id, datafiletype_id, file_id) combination. When upgrading there are two problems:

  • The UNIQUE constraint is not created
  • There is no check for duplicate image files on the same scan

This may create a "dirty" BASE 3 database. It is not difficult to fix the upgrade program, but we also need to get rid of any duplicates that may have been added to an already upgraded server. Basically, we need to scan the database tables for updates and remove all but one of the duplicate rows. After that the UNIQUE index need to be created.

Change History (3)

comment:1 by Nicklas Nordborg, 13 years ago

Resolution: fixed
Status: newclosed

(In [5858]) Fixes #1648: Upgrading from BASE 2 to BASE 3 may create duplicate file set members

This seems to be working now. I'll do some final tests tomorrow and then release 3.0.1.

comment:2 by Nicklas Nordborg, 13 years ago

(In [5866]) References #1648 and #1613. Added a duplicate image reference to a single file to the test program.

comment:3 by Nicklas Nordborg, 12 years ago

(In [6032]) was not part of this ticket. It was part of #1684.

Last edited 12 years ago by Nicklas Nordborg (previous) (diff)
Note: See TracTickets for help on using tickets.