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 <noreply@paperclip.ing>
This commit is contained in:
Barkley Trimsworth
2026-03-30 14:28:05 +00:00
parent 5956ed4fab
commit ec9ec11f72
+1 -1
View File
@@ -417,7 +417,7 @@ async function seedUatClients(db: ReturnType<typeof drizzle>) {
address: null,
})
.onConflictDoUpdate({
target: schema.clients.email,
target: schema.clients.id,
set: { name: uat.name },
});