From a77aa8b4696126feed89324ffb47b02879220b02 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Fri, 16 Jun 2023 14:11:42 +1200 Subject: [PATCH] Bug 34027: DO NOT PUSH!!!! Test data for KTD This is to add some test action logs to your database. DO NOT PUSH. --- misc/cronjobs/cleanup_database.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 42d38636965..450c599b705 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -382,6 +382,10 @@ if ($pZ3950) { if ($pLogs) { print "Purging records from action_logs.\n" if $verbose; + for (0..10000){ + $dbh->do(q{ INSERT INTO action_logs (user,timestamp) VALUES (52,"2022-01-01 09:00:00") }); + $dbh->do(q{ UPDATE action_logs SET timestamp = "2020-01-01 10:00:00" ORDER BY action_id DESC LIMIT 1 }); + } my $log_query = q{ DELETE FROM action_logs WHERE timestamp < date_sub(curdate(), INTERVAL ? DAY) -- 2.30.2