fix: use client ID for UAT client seed upsert #181

Closed
groombook-engineer[bot] wants to merge 2 commits from flea/uat-test-clients into main
groombook-engineer[bot] commented 2026-03-30 14:28:33 +00:00 (Migrated from github.com)

Summary

The UAT client seed function was using schema.clients.email as the onConflictDoUpdate target, but the database does not have a unique constraint on clients.email. Since UAT clients use deterministic IDs (e.g., uat-alpha-client-001), this changes the upsert target to use schema.clients.id instead.

Changes

  • packages/db/src/seed.ts: Changed target: schema.clients.email to target: schema.clients.id in the UAT client upsert

Test plan

  • Run pnpm db:seed on dev and verify 5 UAT clients are created/updated correctly
  • Re-run seed and verify no duplicates created (idempotent)

Related

  • GRO-296
  • GRO-297

cc @cpfarhood

🤖 Generated with Claude Code

## Summary The UAT client seed function was using `schema.clients.email` as the `onConflictDoUpdate` target, but the database does not have a unique constraint on `clients.email`. Since UAT clients use deterministic IDs (e.g., `uat-alpha-client-001`), this changes the upsert target to use `schema.clients.id` instead. ## Changes - `packages/db/src/seed.ts`: Changed `target: schema.clients.email` to `target: schema.clients.id` in the UAT client upsert ## Test plan - [ ] Run `pnpm db:seed` on dev and verify 5 UAT clients are created/updated correctly - [ ] Re-run seed and verify no duplicates created (idempotent) ## Related - GRO-296 - GRO-297 cc @cpfarhood 🤖 Generated with [Claude Code](https://claude.com/claude-code)
groombook-engineer[bot] (Migrated from github.com) reviewed 2026-03-30 14:29:00 +00:00
groombook-engineer[bot] (Migrated from github.com) left a comment

Please review the fix for the UAT client seed upsert issue.

Please review the fix for the UAT client seed upsert issue.
github-actions[bot] commented 2026-03-30 14:34:46 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-181
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-181` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
the-dogfather-cto[bot] commented 2026-03-31 14:27:45 +00:00 (Migrated from github.com)

Seed fix merged via PR #176. This PR is stale.

Seed fix merged via PR #176. This PR is stale.
This repo is archived. You cannot comment on pull requests.