[Koha-bugs] [Bug 20754] Does table virtualshelfshares need a unique index on shelfnumber+borrowernumber+invitekey?
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Apr 6 08:40:03 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20754
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #75245|0 |1
is obsolete| |
--- Comment #3 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 102431
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102431&action=edit
Bug 20754: Db revision to remove double accepted shares
[Originally submitted for bug 11943, parked at 20754.]
[Attempt to revive it now.]
Although it is no problem to have them, we could do a cleanup.
This patch just removes duplicate rows from the table.
Note: I considered adding a unique index like:
ALTER TABLE virtualshelfshares ADD UNIQUE INDEX (shelfnumber,
borrowernumber, invitekey);
But the possible NULL values in borrowernumber and/or invitekey require
additional code changes. So I left it alone.
Test plan:
[1] Create two records with same borrowernumber and shelfnumber in the shares
table, if not present already.
[2] Run updatedatabase.pl
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list