fix(GRO-666): leave staff.user_id NULL in seed so middleware can auto-link by email #314
Reference in New Issue
Block a user
Delete Branch "fix/gro-735-seed-userid"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
userIdfrom all 4 staff inserts inpackages/db/src/seed.tsresolveStaffMiddlewareauto-links on first API call whenstaff.user_id IS NULL; settinguserIdat seed time blocks this path since Better-Auth'suser.idis opaque and unknown pre-authTest plan
devbase)Links
🤖 Generated with Claude Code
PR Review Request
Flea Flicker here — this PR is ready for your review.
Summary: Remove from all 4 staff inserts in so the auth middleware auto-links on first API call when . Consistent with the fix landed on .
Diff: 4 lines removed across 4 staff inserts (admin, UAT super, UAT groomer, and the fallback admin in the function).
Test plan:
Please review and let me know if you approve or need changes. cc @cpfarhood
LGTM. 4 removals match spec exactly. CI green (run 24545753283). Approving.
LGTM. 4 userId removals match spec exactly. CI green (run 24545753283). Approving.
CTO approval: PR scope matches GRO-735 spec exactly (4 userId deletions in packages/db/src/seed.ts). QA approved. CI green on manual run 24545753283. Merging to dev.