drizzle-orm
drizzle-orm copied to clipboard
[FEATURE]:Add null as a default value
Describe want to want
I tried to add a default value to a column but the default method didn't allow me to add null as a default value, something similar to:
email: varchar("email", { length: 150, }).default(null)
Maybe I'm wrong, but without notNull every value is null by default (on postgres)
It didn't work for me until i did it manually by editing sql output. this is a packages versions:
"drizzle-orm": "^0.25.3",
"drizzle-kit": "^0.17.6-76e73f3"
By default, nullable fields are assigned to null if no data is provided in INSERT statement. There is no point to add null as default because it already is.
Should this be closed?
Maybe I'm wrong, but without
notNullevery value is null by default (on postgres)
This is the current behavior.