Bug 19008: More database cleanups - deleted catalog
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 28 Jul 2017 12:05:03 +0000 (14:05 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 4 Feb 2020 13:38:15 +0000 (13:38 +0000)
commit9ddb78f0d36910139a6dea4b0375a760f77d65c4
tree27be66eb1e79dcd8e87633f2b85873a73a777c32
parenteae2dfce063e0b39046f3fffaa460441d2d79060
Bug 19008: More database cleanups - deleted catalog

misc/cronjobs/cleanup_database.pl provides some database cleanup.
Yet some tables that could need cleanup are not in this script.

This patch adds cleanup for deleted catalog tables.
Note that deletedbiblio_metadata is managed by foreign key on biblionumber.

Test plan :
- Count :
select count(*),year(timestamp) from deleteditems group by year(timestamp);
select count(*),year(timestamp) from deletedbiblio group by year(timestamp);
select count(*),year(timestamp) from deletedbiblioitems group by year(timestamp);
- Run cleanup : misc/cronjobs/cleanup_database.pl -v --deleted-catalog 30
- Recount

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/cronjobs/cleanup_database.pl