From ec9ec11f7244c2c1d7994c310c87dea07759264f Mon Sep 17 00:00:00 2001 From: Barkley Trimsworth Date: Mon, 30 Mar 2026 14:28:05 +0000 Subject: [PATCH] fix: use client ID instead of email for UAT client upsert The seed script 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), switch to using schema.clients.id as the upsert target. Co-Authored-By: Paperclip --- packages/db/src/seed.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/db/src/seed.ts b/packages/db/src/seed.ts index 1d73af6..d14dd1a 100644 --- a/packages/db/src/seed.ts +++ b/packages/db/src/seed.ts @@ -417,7 +417,7 @@ async function seedUatClients(db: ReturnType) { address: null, }) .onConflictDoUpdate({ - target: schema.clients.email, + target: schema.clients.id, set: { name: uat.name }, });