You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,7 +217,10 @@ Pre-commit checklist: `npm run build` · tenant filter on every query · tested
217
217
## Known Pitfalls
218
218
219
219
-**`product_courses` — never `.single()`**: a course can belong to multiple products.
220
-
-**`lesson_completions` uses `user_id`**, not `student_id`.
220
+
-**`lesson_completions` uses `user_id`**, not `student_id`. Has **no `tenant_id`** — never filter by it.
221
+
-**`exercise_completions` has no `tenant_id`** — filter by `user_id` only.
222
+
-**`exams` has no `passing_score` or `allow_retake`** — use 70 as default threshold, assume retakes allowed.
223
+
-**`profiles` has no `email`** — get emails via `createAdminClient().auth.admin.getUserById()` if needed.
221
224
-**`exam_submissions` order column** is `submission_date`, not `submitted_at`.
222
225
-**Transaction status** is `'successful'`, not `'succeeded'`.
223
226
-**Creating test users via SQL** won't fire `handle_new_user()` trigger — manually insert `profiles`, `user_roles`, and `auth.identities`. Use `NULL` for `phone` (unique constraint), `''` for nullable string columns.
0 commit comments