fix: correct table name from 'patients' to 'patient' in getTherapistPatients#166
fix: correct table name from 'patients' to 'patient' in getTherapistPatients#166Varadraj75 wants to merge 1 commit intoAOSSIE-Org:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA bug fix that corrects the database table name in the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where getTherapistPatients() was querying a non-existent table named 'patients' instead of the correct singular table name 'patient'. This caused all calls to this function to fail with a Supabase "relation does not exist" error. The fix aligns the code with the established database schema naming convention used throughout the codebase.
Changes:
- Corrected table name from 'patients' (plural) to 'patient' (singular) in the
getTherapistPatients()function
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #165
📝 Description
getTherapistPatientswas querying a non-existent tablepatientsinsteadof the correct table
patient(singular), causing the function to alwaysfail with a Supabase
relation "patients" does not existerror.🔧 Changes Made
therapist/lib/repository/supabase_therapist_repository.dart: Changed.from('patients')→.from('patient')on line 70📷 Screenshots or Visual Changes (if applicable)
N/A — one character typo fix, no visual changes.
🤝 Collaboration
Collaborated with: N/A
✅ Checklist
Summary by CodeRabbit