Bug 21062

Summary: Clean up borrower_password_recovery when patron is deleted
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: DatabaseAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Katrin Fischer 2018-07-11 16:50:51 UTC
When a patron is deleted, any entries in borrower_password_recovery should be deleted as well by cascade.

CREATE TABLE `borrower_password_recovery` (
  `borrowernumber` int(11) NOT NULL,
  `uuid` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `valid_until` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`borrowernumber`),
  KEY `borrowernumber` (`borrowernumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;