[BUG]: postgres insert and generatedAlwaysAsIdentity tries to insert null value #3576
Open
1 task done
Labels
bug
Something isn't working
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.36.3
What version of
drizzle-kit
are you using?not installed
Other packages
No response
Describe the Bug
When using a model like this
and executing
The generated SQL will is
It's trying to set the ID to null just errors, thus making the insert impossible
[2024-11-18 22:43:29] [23502] ERROR: null value in column "id" of relation "materials" violates not-null constraint
I am pretty sure that the Primary Column shouldn't get an insert value
Note: I am using Postgres and tried with version 11 and 16 of postgres
The text was updated successfully, but these errors were encountered: