Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to limit history count on MySQL #44

Open
dorgan opened this issue Jan 14, 2025 · 2 comments
Open

Unable to limit history count on MySQL #44

dorgan opened this issue Jan 14, 2025 · 2 comments

Comments

@dorgan
Copy link

dorgan commented Jan 14, 2025

I am getting the following error when trying to limit the history count for a given job. DB is MySQL version 8.0.40
image

@TobiasPlaten
Copy link
Contributor

Goto src/Http/Services/ScheduleHistoryService.php and change line 9

$keepIds = $schedule->histories()->select('id')->latest()->take($schedule->max_history_count);

to this

$keepIds = $schedule->histories()->select('id')->latest()->take($schedule->max_history_count)->pluck('id')->toArray();

@dorgan
Copy link
Author

dorgan commented Jan 14, 2025

let me create a pull request with that.

dorgan added a commit to dorgan/filament-database-schedule that referenced this issue Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants