Koha-clms/t/db_dependent/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 23051: (QA follow-up) Missing curly and tabs and fix test 2020-03-06 10:03:41 +00:00
Acquisition Bug 18177: (follow-up) remove aqbooksellers.currency 2020-03-27 15:48:15 +00:00
Biblio
…
BiblioUtils Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
Cash Bug 24820: (RM follow-up) Fix test after switch to 'date' field 2020-04-15 11:51:12 +01:00
Charges Bug 22887: (RM follow-up) Fix Charges Test 2020-04-14 19:51:45 +01:00
Checkouts Bug 24507: Make Checkouts/ReturnClaim.t pass on MySQL 8 2020-01-24 15:20:18 +00:00
Club Bug 24546: Fix intentions of build_sample_item in Club/Hold.t 2020-01-31 13:55:55 +00:00
Config
…
Filter
…
IssuingRules Bug 18936: Fix IssuingRules/guess_article_requestable_itemtypes.t 2020-02-04 09:56:29 +00:00
Item
…
Library
…
Objects/Mixin Bug 23994: Fix random failure from AdditionalFields.t (U18) 2019-11-08 09:31:47 +00:00
Patron Bug 20443: Move C4::Members::AttributeTypes::GetAttributeTypes to Koha::Patron::Attribute::Types 2020-03-23 13:44:35 +00:00
Patrons Bug 23473: (QA follow-up) Fix number of tests 2020-03-27 12:23:22 +00:00
Plugins Bug 20415: Remove UseKohaPlugins system preference 2020-03-26 11:42:02 +00:00
REST Bug 25131: Regression tests 2020-04-16 19:21:06 +01:00
SearchEngine Bug 23204: Fix tests swapping fields (they are not ordered) 2020-03-27 15:39:34 +00:00
Subscription
…
Tags
…
Template/Plugin Bug 20415: Remove UseKohaPlugins system preference 2020-03-26 11:42:02 +00:00
XSLT Bug 24052: Catch warning between test 5 and 6 2020-03-24 10:42:23 +00:00
Z3950Responder Bug 24827: Specify UTF-8 as encoding in new_from_xml() 2020-03-16 14:45:47 +00:00
Account.t Bug 24818: (RM follow-up) Update tests for DATE -> TIMESTAMP change 2020-03-19 13:05:58 +00:00
ActionLogs.t Bug 24329: Add a test 2020-01-08 11:05:00 +00:00
ApiKeys.t
…
Authorities.t
…
Biblio.t Bug 18936: (follow-up) Adjust circ rule related tests so that they pass 2020-02-04 09:56:29 +00:00
BiblioFrameworks.t
…
Biblios.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
Checkouts.t
…
CirculationRules.t Bug 24602: Tests for get_onshlefholds_policy 2020-02-10 08:56:30 +00:00
Cities.t
…
ClassSortRules.t
…
ClassSources.t
…
ClassSplitRules.t
…
CsvProfiles.t
…
Database.t Bug 22001: Add tests 2020-03-27 08:53:02 +00:00
Desks.t Bug 13881: Add desk management 2020-03-25 09:19:15 +00:00
GetDailyQuote.t
…
Holds.t Bug 24722: Add test 2020-03-17 16:48:52 +00:00
IssuingRules.t Bug 18936: (follow-up) Add cloning of circulation rules back to Koha 2020-02-04 09:56:29 +00:00
Item.t Bug 25006: Regression tests 2020-04-03 14:26:33 +01:00
ItemTypes.t Bug 24545: Fix license statements 2020-02-24 13:31:26 +00:00
Items.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
KeyboardShortcuts.t
…
Libraries.t Bug 22823: return undef if KohaAdminEmailAddress not exist 2020-03-18 15:44:27 +00:00
MarcSubfieldStructures.t
…
News.t
…
Notices.t
…
Object.t 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.t Bug 25044: Remove the need to define koha_object[s]_class for standard object class names 2020-04-14 08:35:53 +01:00
Old.t Bug 24150: Prevent random failure comparing updated_on 2020-01-07 16:27:54 +00:00
Patron.t Bug 24459: Regression tests 2020-01-23 09:07:07 +00:00
Patrons.t Bug 13518: Delete patron's modifications along with the patron 2020-04-20 12:19:16 +01:00
Ratings.t
…
Reports.t
…
Reviews.t
…
SMS_Providers.t
…
SearchField.t
…
SharedContent.t Bug 23075: (RM follow-up) Update mock in tests 2019-11-07 07:56:17 +00:00
Statistics.t Bug 24149: Add tests 2020-01-23 10:40:24 +00:00
Subscription.t
…
Suggestion.t Bug 24419: Add Koha::Suggestion->suggester accessor 2020-01-20 16:37:22 +00:00
Suggestions.t Bug 23591: Add some useful methods to Koha::Suggestions 2020-04-14 16:36:13 +01:00
Tags.t
…
Z3950Servers.t
…