https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33905 --- Comment #21 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to David Cook from comment #18)
(In reply to David Cook from comment #1)
We have a lot of patrons whose userid and cardnumber are the same, so I'd want to preserve that.
But it does make sense to prevent a userid/cardnumber that belongs to the cardnumber/userid of another borrower...
You know... this problem would be simpler to solve via the schema if we eliminated the requirement that 1 user's userid and cardnumber can be the same.
Because then we could just have a "borrower_identifiers" table with a unique index on "value".
borrower_identifiers `value`,`type`,`borrowernumber` '42', 'cardnumber',51 'koha','userid',51 UNIQUE(value)
--
But... that would also be a big breaking change...
We are now having THE conversation, and we know how it looks to use the triggers. I will give the separate table a try tomorrow -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.