Comment 5 for bug 1744153

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Barcodes have a similar problem:

select a.id, a.usr, a.barcode, b.id, b.usr, b.barcode
from actor.card a
join actor.card b
on lower(b.barcode) = lower(a.barcode)
and b.id > a.id
and b.usr <> a.usr
and a.active and b.active;

The above finds a couple of duplicates on our system that might be tied to duplicate or even deleted user accounts. I didn't push it that far, but checking for active barcodes should throw out deleted users.