-
Notifications
You must be signed in to change notification settings - Fork 587
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
[5.x] Enhance Telescope Clear Method #1507
Conversation
This reverts commit c3a794a.
Reverted due to #1509 |
I’d like to respectfully address the decision to revert the recent commit related to the Key Points:
Reverting this change might have been premature, as the issue raised does not seem to apply to most production environments, where the efficiency and reliability of I am, of course, open to further discussion and am happy to collaborate on ensuring the best outcome for the Laravel Telescope package. Thank you for considering my points. |
This PR enhances the
clear
method in Laravel Telescope'sDatabaseEntriesRepository
to improve the efficiency and reliability of clearing thetelescope_entries
andtelescope_monitoring
tables.Key Improvements:
Schema::disableForeignKeyConstraints()
before attempting to truncate the tables. This avoids foreign key conflicts during truncation.QueryException
occurs during truncation, the method catches the exception and reverts to chunked deletion. This ensures the tables are cleared even if truncation isn't possible due to database constraints or limitations.References: