-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What version of drizzle-orm are you using?
0.26.3
What version of drizzle-kit are you using?
0.18.1
Describe the Bug
Hey all!
I've found a funny problem while using drizzle + postgres (Vercel postgres).
Having this schema:
export const Processings = pgTable('processings', {
id: serial('id').primaryKey(),
name: text('name').notNull(),
estimateHours: integer('estimateHours').notNull(),
processDefinitionId: integer('processDefinitionId').references(() => ProcessDefinitions.id)
});When trying to upsert a new Processing using
await db
.insert(Processings)
.values(form.data.processings)
.onConflictDoUpdate({
target: Processings.id,
set: {
name: sql`excluded.name`,
processDefinitionId: sql`excluded.processDefinitionId`,
estimateHours: sql`excluded.estimateHours`,
},
});The query returns this error:
error: column excluded.processdefinitionid does not exist
and further in the error:
hint: 'Perhaps you meant to reference the column "excluded.processDefinitionId".'
The difference is in the casing of processDefinitionId.
I'm on typescript so I'm using intellisense suggestions.
Expected behavior
No response
Environment & setup
I'm using sveltekit right now
Vercel Postgres
Typescript
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working