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:
@@ -417,7 +417,7 @@ async function seedUatClients(db: ReturnType<typeof drizzle>) {
|
|||||||
address: null,
|
address: null,
|
||||||
})
|
})
|
||||||
.onConflictDoUpdate({
|
.onConflictDoUpdate({
|
||||||
target: schema.clients.email,
|
target: schema.clients.id,
|
||||||
set: { name: uat.name },
|
set: { name: uat.name },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user