Exit early if no logs found

This commit is contained in:
Marcus Moore 2025-04-03 12:56:46 -07:00
parent faee50c222
commit 6dd3ab2ec9
No known key found for this signature in database

View file

@ -41,6 +41,11 @@ class FixBulkAccessoryCheckinActionLogEntries extends Command
// Logs that were improperly timestamped should have created_at in the 1970s
$logs = Actionlog::whereYear('created_at', '1970')->get();
if ($logs->isEmpty()) {
$this->info('No logs found with incorrect timestamps.');
return 0;
}
$this->info('Found ' . $logs->count() . ' logs with incorrect timestamps:');
$this->table(