Bug 24152: Add the ability to purge pseudonymized tables
commitf59475a36056eacbebcac526c9bf7eaf591ea5de
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 29 Nov 2019 15:08:16 +0000 (29 16:08 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 20 Jul 2020 14:08:22 +0000 (20 16:08 +0200)
treee5d983926b89f7707c49fdee106ba196157ff553
parent98fde332d8f1aa78e37ad2f401c21bd3b272e907
Bug 24152: Add the ability to purge pseudonymized tables

anonymized_* tables have been added by bug 24151, this patch adds the
usual way to purge data from them.

The cleanup_database.pl script has been adjusted to take new parameters
that will help to delete pseudonymized data.

Test plan:
Call the scrip with the new parameter to remove pseudonymized data
* --pseudo-transactions DAYS will remove entries from pseudonymized_transactions older
than DAYS day
* --pseudo-transactions can be used without the parameter DAYS but with
-- pseudo-transactions-from and/or --pseudo-transactions-to instead, to provide a
range of date

You can use the patch from bug 24153 to make the tests easier, data will
not be deleted if the new --confirm flag is not passed.

Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Objects.pm
misc/cronjobs/cleanup_database.pl
t/db_dependent/Koha/Objects.t