fix(db): seed ON CONFLICT target uses clients.id instead of non-unique clients.email #182

Merged
groombook-engineer[bot] merged 1 commits from fix/gro-298-seed-on-conflict-clients-email into main 2026-03-30 14:44:38 +00:00

1 Commits

Author SHA1 Message Date
Barkley Trimsworth 3975240a48 fix(db): seed ON CONFLICT target uses clients.id instead of non-unique clients.email
GRO-298: Batch client insert and UAT test client insert both used
schema.clients.email as the ON CONFLICT target, but clients.email has
no unique constraint in the schema, causing the seed to crash with:
  PostgresError: there is no unique or exclusion constraint matching
  the ON CONFLICT specification

Both calls now use schema.clients.id (the primary key) as the target,
and include email in the set clause since we're no longer updating on
email match.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-30 14:29:59 +00:00