Yeah, the legacy data is the hard part.  It means you can't do it cleanly in updatedatabase.  First thing to do would be add an admin page that reports on any existing conflicts.  That way the problem can be detected before the upgrade is attempted.  

--Joe

On Fri, Feb 5, 2010 at 12:24 PM, Chris Nighswonger <cnighswonger@foundations.edu> wrote:
Hi all,

As things stand in the current HEAD, borrowers.userid is constrained
by memberentry.pl code to be unique preventing duplicate userids. The
import_borrowers.pl script does *not* enforce this restraint thus
introducing the possibility of duplicate userids. Most AAA systems
with which I am familiar prohibit the use of duplicate userids. I
believe that this constraint should be enforced at the database level
in Koha. Making this change will also ensure that the constraint is
honored by custom patron import utilities/interfaces.

The only fallout I can see from this change would occur if an existing
database was already populated with duplicate userids. This would, of
course, have to be addressed with some sort of custom foo in order to
enable the change to be applied to the db schema.

What are your thoughts on this?

Kind Regards,
Chris