Bugzilla – Attachment 172545 Details for
Bug 34027
Add functionality to cleanup_database.pl to purge action logs in batches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34027: DO NOT PUSH!!!! Test data for KTD
Bug-34027-DO-NOT-PUSH-Test-data-for-KTD.patch (text/plain), 1.11 KB, created by
Kyle M Hall (khall)
on 2024-10-08 18:00:48 UTC
(
hide
)
Description:
Bug 34027: DO NOT PUSH!!!! Test data for KTD
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-10-08 18:00:48 UTC
Size:
1.11 KB
patch
obsolete
>From 01c29793df2bd2456834865ac4569817d2b3bdcd Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >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. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 e1072d56814..7af1088b431 100755 >--- a/misc/cronjobs/cleanup_database.pl >+++ b/misc/cronjobs/cleanup_database.pl >@@ -397,6 +397,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.39.5 (Apple Git-154)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34027
:
152394
|
152395
|
167407
|
167408
|
167412
|
167413
|
167414
|
172506
|
172543
|
172544
| 172545 |
172546
|
172547