]> git.koha-community.org Git - koha.git/commit
Bug 18631: Add option to specify logs to preserve or delete in cleanup_database.pl
authorNick Clemens <nick@bywatersolutions.com>
Wed, 21 Jul 2021 19:15:27 +0000 (19:15 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Oct 2021 09:07:05 +0000 (11:07 +0200)
commit951587562601171c2946b50d2d1cbee2915613a2
tree3325563a29368e6a9709c9cfaa50d931f91873fe
parent156a59926885fba3b4fd0448c8bfd2edb82d3ab9
Bug 18631: Add option to specify logs to preserve or delete in cleanup_database.pl

This adds two new parameters:
--log_module
--preserve_log

These can be repeated to include or exclude specific modules from the cleanup

To test:
0 - Apply patch
1 - Enable cataloging log and borrowers log
2 - Make some changes to borrowers and records
3 - run cleanup databse with --logs 0 --preserve_log=MEMBERS --preserve_log=CATALOGUING
4 - nothing is removed
5 - run cleanup databse with --logs 0 --log_module=MEMBERS
6 - the borrower logs are removed, the record changes remain
7 - run cleanup database with --logs 0
8 - record changes are removed (all other logs too)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
misc/cronjobs/cleanup_database.pl