Document how to correctly use @default
for JSON columns
#5494
Labels
docs
Documentation creation, updates or corrections
@default
for JSON columns
#5494
JSON values in
@default()
should be quoted:history Json @default("[]")
See prisma/prisma#22063.
That makes sense with the way JSON is handled one the engine side, however, for TS users this is not as obvious, as they always receive JSON as a parsed values. I haven't found explicit mention of this in either JSON or
@default
documentation.The text was updated successfully, but these errors were encountered: