Koha-clms/Koha
Jonathan Druart d8dd31142c
Bug 13518: Delete patron's modifications along with the patron
The table borrower_modifications has no FK constraint on the borrowernumber
and will remain untouched when the patron is deleted.
If the borrowernumber doesn't exist in the database, the modification entry is no longer visible in Koha.

The problem is that this table is used for the borrower modifications and the self-registration features.

So far borrowernumber is the PK (int(11) NOT NULL DEFAULT '0'), for the self-registration feature we can have borrowernumber that is not defined (0 is used)

Ideally we would like to have borrowernumber a DEFAULT NULL, and use NULL for self-reg, but then we will loose the PK (PK cannot be NULL).

As we cannot keep the correct constraints at DB level anyway, we will need to handle consistency at code-level.

Test plan:
Create a new patron
Do some modification at the OPAC
Delete the patron
Confirm that the modifications as been removed (directly in DB)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-20 12:19:16 +01:00
..
Account Bug 24474: Filter out LOST_FOUND 2020-04-03 14:26:32 +01:00
Acquisition Bug 18177: remove aqbooksellers.currency 2020-03-27 12:15:55 +00:00
ArticleRequest Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Authority Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Biblio Bug 24827: Standardise on 'UTF-8' as the encoding name 2020-03-16 14:45:39 +00:00
BiblioUtils Bug 24827: Specify UTF-8 as encoding in new_from_xml() 2020-03-16 14:45:47 +00:00
Cache Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Cash Bug 24820: Use 'date' instead of 'timestamp' for cashup 2020-04-15 08:33:50 +01:00
Charges Bug 21443: Remove the dependency on finesCalendar 2020-03-24 11:09:16 +00:00
Checkouts Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Club Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Config Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Course Bug 23727: Editing course reserve items is broken 2020-04-17 13:45:56 +01:00
Edifact Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Exceptions Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Exporter Bug 22721: Remove frameworkcode parameter in GetMarcFromKohaField calls 2019-07-15 11:28:08 +01:00
ExternalContent Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Filter/MARC Bug 25019: Make the ViewPolicy filter initialization standard 2020-04-08 11:45:47 +01:00
Illrequest Bug 23173: (follow-up) Fix QA script errors 2020-04-06 11:05:14 +01:00
Indexer Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Item Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Library Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
List Bug 19524: Share patron lists between staff 2018-07-18 16:49:29 +00:00
MetadataRecord Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Middleware Bug 24538: Handle Net::Netmask parser errors 2020-02-20 08:40:52 +00:00
Misc Bug 16011: $VERSION - Remove use vars qw(); 2016-03-24 17:20:39 +00:00
Notice Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Number Bug 18736: (follow-up) Fix missing rounding and bad formatting 2019-03-21 16:29:06 +00:00
OAI/Server Bug 24052: Rename XSLT_Handler 2020-03-24 10:42:23 +00:00
Object Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Objects Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Old Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Patron Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Patrons Bug 23473: Don't allow staff password changes for imports 2020-03-27 12:23:12 +00:00
Plugins Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
REST Bug 25131: (QA follow-up) Move test for needs_install outside the plugin 2020-04-16 19:21:19 +01:00
RecordProcessor Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
SMS Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Schema Bug 24768: (RM follow-up) Add missing koha_object_class's 2020-04-17 16:06:08 +01:00
SearchEngine Bug 25050: Adjust marc_records_to_documents to search entire mapping array 2020-04-14 08:22:33 +01:00
Serial Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Sitemapper Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Subscription Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
SuggestionEngine Bug 14457: (QA follow-up) Fix POD 2019-04-16 13:17:34 +00:00
Tags Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Template/Plugin Bug 20415: Add POD 2020-03-26 11:42:11 +00:00
Util Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
XSLT Bug 23290: (RM follow-up) Correction to copyright statement 2020-02-25 14:35:39 +00:00
Z3950Responder Bug 24545: (follow-up) Fix license statements 2020-02-24 14:35:33 +00:00
pdfformat Bug 5016: Fix some translation issues with English PDF order templates 2020-02-19 11:26:41 +00:00
Account.pm Bug 24474: (follow-up) Add LOST_FOUND logic to Koha::Account::pay 2020-04-03 14:26:32 +01:00
ActionLog.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ActionLogs.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
AdditionalField.pm Bug 15774: Add POD and license notices 2019-03-07 20:37:05 +00:00
AdditionalFieldValue.pm Bug 22934: Add missing use statement 2019-05-23 14:43:16 +00:00
AdditionalFieldValues.pm Bug 15774: (follow-up) Address QA issues 2019-03-07 20:37:05 +00:00
AdditionalFields.pm Bug 15774: Add POD and license notices 2019-03-07 20:37:05 +00:00
ApiKey.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ApiKeys.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ArticleRequest.pm Bug 23384: Fix use statement order for ArticleRequest::Status 2020-03-06 15:00:25 +00:00
ArticleRequests.pm Bug 23384: Fix use statement order for ArticleRequest::Status 2020-03-06 15:00:25 +00:00
AudioAlert.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
AudioAlerts.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
AuthUtils.pm Bug 20370: Misleading comment for bcrypt - #encrypt it; Instead it should be #hash it 2020-04-14 08:35:24 +01:00
AuthorisedValue.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
AuthorisedValueCategories.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
AuthorisedValueCategory.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
AuthorisedValues.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Authorities.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Authority.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Biblio.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
BiblioFramework.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
BiblioFrameworks.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
BiblioUtils.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Biblioitem.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Biblioitems.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Biblios.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Cache.pm Bug 13193: Make Memcached usage fork safe 2020-02-07 09:58:47 +00:00
Caches.pm Bug 17935: Adjust some POD lines, fix a few typos 2017-02-14 14:12:50 +00:00
Calendar.pm Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Checkout.pm Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Checkouts.pm Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
CirculationRule.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
CirculationRules.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Cities.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
City.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ClassSortRule.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ClassSortRules.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ClassSource.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ClassSources.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ClassSplitRule.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ClassSplitRules.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Club.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Clubs.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Config.pm Bug 19760: Die if koha-conf is not accessible 2017-12-22 13:15:35 -03:00
Course.pm Bug 23727: Add Koha Object(s) related to course reserves 2020-04-17 13:45:51 +01:00
Courses.pm Bug 23727: Add Koha Object(s) related to course reserves 2020-04-17 13:45:51 +01:00
CsvProfile.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
CsvProfiles.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Database.pm Bug 22001: Set unsafe only if RaiseError is not set 2020-03-31 15:17:23 +01:00
DateUtils.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Desk.pm Bug 13881: Add desk management 2020-03-25 09:19:15 +00:00
Desks.pm Bug 13881: Add desk management 2020-03-25 09:19:15 +00:00
EDI.pm Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
Edifact.pm Bug 7736: Support Ordering via Edifact EDI messages 2016-04-01 20:03:17 +00:00
Email.pm Bug 24826: Remove warnings from Sendmail 2020-04-08 11:47:19 +01:00
Exceptions.pm Bug 24080: Add 'payout' method to Koha::Account::Line 2020-01-03 16:35:38 +00:00
ExternalContent.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
FrameworkPlugin.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Hold.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Holds.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
I18N.pm Bug 15395: Use POSIX::setlocale 2018-11-08 16:40:05 +00:00
Illcomment.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Illcomments.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Illrequest.pm Bug 24840: (follow-up) Catch some further cases of DateTime->now 2020-04-08 11:54:36 +01:00
Illrequestattribute.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Illrequestattributes.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Illrequests.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Item.pm Bug 24027: Add POD about the new parameter in Koha::Item->store 2020-04-14 08:15:19 +01:00
ItemType.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
ItemTypes.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Items.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
KeyboardShortcut.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
KeyboardShortcuts.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Libraries.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Library.pm Bug 22823: return undef if KohaAdminEmailAddress not exist 2020-03-18 15:44:27 +00:00
Linktracker.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Localization.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Localizations.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Logger.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Manual.pm Bug 24837: Rename selectbranchprinter.pl to set-library.pl 2020-03-24 11:07:22 +00:00
MarcSubfieldStructure.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
MarcSubfieldStructures.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
MetaSearcher.pm Bug 24173: Advanced Editor: Show subtitle & published date on the search page 2020-01-03 16:21:29 +00:00
MetadataIterator.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
MetadataRecord.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
MoreUtils.pm Bug 19069: (follow-up) Remove perlcritic error 2017-10-27 14:58:16 -03:00
News.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
NewsItem.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
OAuth.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
OAuthAccessToken.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
OAuthAccessTokens.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Object.pm Bug 25044: Remove the need to define koha_object[s]_class for standard object class names 2020-04-14 08:35:53 +01:00
Objects.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Patron.pm Bug 13518: Delete patron's modifications along with the patron 2020-04-20 12:19:16 +01:00
Patrons.pm Bug 20443: Fix POD 2020-03-23 13:49:23 +00:00
Plugins.pm Bug 21073: (QA follow-up) Simplify logic 2019-06-18 17:30:31 +01:00
ProblemReport.pm Bug 4461: Update license statements 2020-04-06 11:18:39 +01:00
ProblemReports.pm Bug 4461: Update license statements 2020-04-06 11:18:39 +01:00
RDF.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Rating.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Ratings.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
RecordProcessor.pm Bug 25008: Overload Koha::RecordProcessor->options to update filters 2020-04-14 08:31:37 +01:00
RefundLostItemFeeRules.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Report.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Reports.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Review.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Reviews.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Schema.pm Bug 11891: (follow-up) remove custom storage class 2014-06-19 11:55:03 -03:00
Script.pm Bug 23571: (QA follow-up) Remove perlcritic warning 2020-04-14 17:24:35 +01:00
SearchEngine.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
SearchField.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
SearchFields.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
SearchMarcMap.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
SearchMarcMaps.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Serial.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Serials.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
SharedContent.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
SimpleMARC.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Sitemapper.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Statistic.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Statistics.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
StockRotationItem.pm Bug 24840: (follow-up) Catch some further cases of DateTime->now 2020-04-08 11:54:36 +01:00
StockRotationItems.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
StockRotationRota.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
StockRotationRotas.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
StockRotationStage.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
StockRotationStages.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Subscription.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Subscriptions.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Suggestion.pm Bug 23591: Add some useful methods to Koha::Suggestions 2020-04-14 16:36:13 +01:00
SuggestionEngine.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Suggestions.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Tag.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Tags.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Token.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
UploadedFile.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
UploadedFiles.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Uploader.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Virtualshelf.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Virtualshelfcontent.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Virtualshelfcontents.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Virtualshelfshare.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Virtualshelfshares.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Virtualshelves.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Z3950Responder.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Z3950Server.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Z3950Servers.pm Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00