Koha/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
Authority
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
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
Club
Config
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
Exporter
ExternalContent
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
Item
Library
List
MetadataRecord
Middleware
Misc
Notice
Number
OAI/Server Bug 24052: Rename XSLT_Handler 2020-03-24 10:42:23 +00:00
Object
Objects
Old
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
pdfformat
Plugins
RecordProcessor
REST Bug 25131: (QA follow-up) Move test for needs_install outside the plugin 2020-04-16 19:21:19 +01: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
Sitemapper Bug 24840: Replace DateTime->now with dt_from_string 2020-04-08 11:54:23 +01:00
SMS
Subscription
SuggestionEngine
Tags
Template/Plugin Bug 20415: Add POD 2020-03-26 11:42:11 +00:00
Util
XSLT Bug 23290: (RM follow-up) Correction to copyright statement 2020-02-25 14:35:39 +00:00
Z3950Responder
Account.pm Bug 24474: (follow-up) Add LOST_FOUND logic to Koha::Account::pay 2020-04-03 14:26:32 +01:00
ActionLog.pm
ActionLogs.pm
AdditionalField.pm
AdditionalFields.pm
AdditionalFieldValue.pm
AdditionalFieldValues.pm
ApiKey.pm
ApiKeys.pm
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
AudioAlerts.pm
AuthorisedValue.pm
AuthorisedValueCategories.pm
AuthorisedValueCategory.pm
AuthorisedValues.pm
Authorities.pm
Authority.pm
AuthUtils.pm Bug 20370: Misleading comment for bcrypt - #encrypt it; Instead it should be #hash it 2020-04-14 08:35:24 +01:00
Biblio.pm
BiblioFramework.pm
BiblioFrameworks.pm
Biblioitem.pm
Biblioitems.pm
Biblios.pm
BiblioUtils.pm
Cache.pm
Caches.pm
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
CirculationRules.pm
Cities.pm
City.pm
ClassSortRule.pm
ClassSortRules.pm
ClassSource.pm
ClassSources.pm
ClassSplitRule.pm
ClassSplitRules.pm
Club.pm
Clubs.pm
Config.pm
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
CsvProfiles.pm
Database.pm Bug 22001: Set unsafe only if RaiseError is not set 2020-03-31 15:17:23 +01:00
DateUtils.pm
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
Email.pm Bug 24826: Remove warnings from Sendmail 2020-04-08 11:47:19 +01:00
Exceptions.pm
ExternalContent.pm
FrameworkPlugin.pm
Hold.pm
Holds.pm
I18N.pm
Illcomment.pm
Illcomments.pm
Illrequest.pm Bug 24840: (follow-up) Catch some further cases of DateTime->now 2020-04-08 11:54:36 +01:00
Illrequestattribute.pm
Illrequestattributes.pm
Illrequests.pm
Item.pm Bug 24027: Add POD about the new parameter in Koha::Item->store 2020-04-14 08:15:19 +01:00
Items.pm
ItemType.pm
ItemTypes.pm
KeyboardShortcut.pm
KeyboardShortcuts.pm
Libraries.pm
Library.pm Bug 22823: return undef if KohaAdminEmailAddress not exist 2020-03-18 15:44:27 +00:00
Linktracker.pm
Localization.pm
Localizations.pm
Logger.pm
Manual.pm Bug 24837: Rename selectbranchprinter.pl to set-library.pl 2020-03-24 11:07:22 +00:00
MarcSubfieldStructure.pm
MarcSubfieldStructures.pm
MetadataIterator.pm
MetadataRecord.pm
MetaSearcher.pm
MoreUtils.pm
News.pm
NewsItem.pm
OAuth.pm
OAuthAccessToken.pm
OAuthAccessTokens.pm
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
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
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
Rating.pm
Ratings.pm
RDF.pm
RecordProcessor.pm Bug 25008: Overload Koha::RecordProcessor->options to update filters 2020-04-14 08:31:37 +01:00
RefundLostItemFeeRules.pm
Report.pm
Reports.pm
Review.pm
Reviews.pm
Schema.pm
Script.pm Bug 23571: (QA follow-up) Remove perlcritic warning 2020-04-14 17:24:35 +01:00
SearchEngine.pm
SearchField.pm
SearchFields.pm
SearchMarcMap.pm
SearchMarcMaps.pm
Serial.pm
Serials.pm
SharedContent.pm
SimpleMARC.pm
Sitemapper.pm
Statistic.pm
Statistics.pm
StockRotationItem.pm Bug 24840: (follow-up) Catch some further cases of DateTime->now 2020-04-08 11:54:36 +01:00
StockRotationItems.pm
StockRotationRota.pm
StockRotationRotas.pm
StockRotationStage.pm
StockRotationStages.pm
Subscription.pm
Subscriptions.pm
Suggestion.pm Bug 23591: Add some useful methods to Koha::Suggestions 2020-04-14 16:36:13 +01:00
SuggestionEngine.pm
Suggestions.pm
Tag.pm
Tags.pm
Token.pm
UploadedFile.pm
UploadedFiles.pm
Uploader.pm
Virtualshelf.pm
Virtualshelfcontent.pm
Virtualshelfcontents.pm
Virtualshelfshare.pm
Virtualshelfshares.pm
Virtualshelves.pm
Z3950Responder.pm
Z3950Server.pm
Z3950Servers.pm