[Koha-bugs] [Bug 10361] Add Option to cleanup_database.pl to purge search_history entries

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 11 15:36:29 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10361

Mirko Tietgen <mirko at abunchofthings.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18838|0                           |1
        is obsolete|                            |

--- Comment #6 from Mirko Tietgen <mirko at abunchofthings.net> ---
Created attachment 18839
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18839&action=edit
Bug 10361 Add Option to cleanup_database.pl to purge search_history entries

Add an option to cleanup_database.pl to purge the search_history entries older
than X days.
Revised version, moved DELETE FROM search_history to Search.pm

Test plan:

- Apply patch
- Check that your test DB has some entries a little older than 30 days and a
few ones even older than that in search_history:
SELECT * FROM search_history WHERE time < DATE_SUB( NOW(), INTERVAL 30 DAY );
If not, modify some existing entries.
- Run cleanup_database with a fixed number of days (replace XX with something
higher than 30)
/misc/cronjobs/cleanup_database.pl --searchhistory XX
- check that entries older than XX days got deleted from search_history
- run without the day parameter
/misc/cronjobs/cleanup_database.pl --searchhistory
- check that entries older than 30 days got deleted from search_history
- Signoff

Rebased to master.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list