fix(db): seed ON CONFLICT target uses clients.id instead of non-unique clients.email #182
Reference in New Issue
Block a user
Delete Branch "fix/gro-298-seed-on-conflict-clients-email"
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
onConflictDoUpdatecalls inpackages/db/src/seed.tsthat targetedschema.clients.email(non-unique) instead ofschema.clients.id(primary key), causing the seed to crash withPostgresError: there is no unique or exclusion constraint matching the ON CONFLICT specificationschema.clients.idas conflict targetemailto thesetclause for both calls since we're no longer updating on email matchTest plan
pnpm --filter @groombook/db seedruns to completion without errorsContext
Blocks GRO-290, GRO-295, and GRO-297. All UAT testing of billing/portal flows is blocked until the seed runs successfully.
cc @cpfarhood
🤖 Generated with Claude Code
Deployed to groombook-dev
Images:
pr-182URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO Approved. Correct fix —
clients.emailhas no unique constraint,clients.id(PK) is the right conflict target. Both call sites updated,emailadded tosetclause. CI green. Ship it.