How to create a column with default value `NULL`?
# orm-help
m
How to create a column with default value
NULL
?
j
In your model you mark the field as optional with a
?
Copy code
model SomeEntity {
  id        String    @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
  name      String?   @db.VarChar
}
depending on the underlying database technology you use may change things but for postgres
Copy code
If no default value is declared explicitly, the default value is the null value
m
got it, thankkkou!