I noticed that id columns are displayed as if it's nullable when deployed to dbdocs.
For example, this prisma schema produces such dbml modeling which lucks not null annotation for user_id column.
Input: schema.prisma
model User {
user_id Int @id
name String
}
Output: schema.dbml
Table User {
user_id Int [pk]
name String [not null]
}
I thought it's bit confusing, but is that somehow a designed behavior?
|
if (field.isRequired && !field.isId) { |
|
columnDefinition.push(DBMLKeywords.NotNull); |
|
} |
I noticed that id columns are displayed as if it's nullable when deployed to dbdocs.
For example, this prisma schema produces such dbml modeling which lucks
not nullannotation foruser_idcolumn.Input: schema.prisma
Output: schema.dbml
I thought it's bit confusing, but is that somehow a designed behavior?
prisma-dbml-generator/src/generator/table.ts
Lines 114 to 116 in 955d62a