[Koha-bugs] [Bug 13518] Table borrower_modifications is missing FK and not deleted with the patron
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 15 23:27:24 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13518
--- Comment #3 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
I see what you by it being used for 2 features.
So we have:
`verification_token` varchar(255) NOT NULL DEFAULT '',
`borrowernumber` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`verification_token` (191),`borrowernumber`),
Because we either have it's either or:
modification:
borrowernumber != 0 or, no verfication token
self registration
borrower = 0, verififcation token exists
The design, if I understand it correctly, also means that one patron can only
have one modification request at a time.
And a PK column can not be NULL... as the resulting keys wouldn't be unique any
more.
The main idea about the FK was to make sure we don't keep storing address and
other personal data in there when the patron was long deleted.
Would it be simpler to solve that in the method deleting the patron? (where we
move the data to deleted_borrowers?
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list