-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
script to backup logs #369
Conversation
✅ Deploy Preview for webcapgo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
🤖 ChatGPT score: Based on the provided diff, I would score the pull request with a 90. The script adds functionality to backup and delete entries from specific tables in a Supabase database based on a cutoff date. The code appears well-structured and handles potential errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
@ayusham001 Can you add a GitHub Action Workflow as well (as per Make a script to backup logs (stats table) and delete from db logs older than X days #367 (comment))?
-
Also, https://supabase.com/docs/reference/javascript/select#:~:text=%3D%20await%20query-,Fetch%20data,-Perform%20a%20SELECT supabase only returns top 1K rows, can you handle pagination as well?
Hi @rishi-raj-jain and @akhill10, I have made the necessary changes. Please take a look at it. |
@ayusham001 can you resolve the comments from above you think are done? I still see some of them are not resolved after your latest commit. |
Which one are you talking about? I made some changes in the recent one |
@rishi-raj-jain It looks like you haven't submitted your review as it still shows |
@rishi-raj-jain I guess you haven't submitted the review |
Co-authored-by: Akhil <[email protected]>
@ayusham001 I've submitted my review now. Thanks for informing! |
@rishi-raj-jain I have made the changes, Please have a look at it. |
Hi @riderx, I have made the changes that have been suggested |
@ayusham001 taking a look right now |
@ayusham001 did you evaluate to do it in SQL directly ? I'm afraid to bloat the db with the loop query that way |
I've left a comment to be addressed ^^ Do confirm if you see it. |
@rishi-raj-jain please have a look at it:) |
@riderx I have used SQL query instead of Supabase SDK in my recent commit. |
I think @riderx was pointing out that, instead of using supabase SDK. Create a SQL function in postgres db that executes this logic directly maybe with the help of storage extensions. |
How is this different from using Supabase SQL rpc? |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
LGTM |
/claim #367