Remove skip(10) from activity_log and webhooks cleanup
This commit is contained in:
parent
85c36df2a3
commit
b3d15f91e4
@ -36,7 +36,6 @@ public function handle()
|
||||
}
|
||||
|
||||
// Cleanup activity_log table
|
||||
// but keep the last 10
|
||||
$activity_log = DB::table('activity_log')->where('created_at', '<', now()->subDays($keep_days))->orderBy('created_at', 'desc')->skip(10);
|
||||
$count = $activity_log->count();
|
||||
echo "Delete $count entries from activity_log.\n";
|
||||
@ -53,7 +52,7 @@ public function handle()
|
||||
}
|
||||
|
||||
// Cleanup webhooks table
|
||||
$webhooks = DB::table('webhooks')->where('created_at', '<', now()->subDays($keep_days))->orderBy('created_at', 'desc')->skip(10);
|
||||
$webhooks = DB::table('webhooks')->where('created_at', '<', now()->subDays($keep_days));
|
||||
$count = $webhooks->count();
|
||||
echo "Delete $count entries from webhooks.\n";
|
||||
if ($this->option('yes')) {
|
||||
|
Loading…
Reference in New Issue
Block a user