You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typed Json columns (#995, #999): declare static $json = { column: schema } on a model. The column is parsed on read and validated on write, and rows are typed through the generator. Re-run prisma generate to get the types.
Upgrade notes
Opt-in per model: nothing changes until a model declares $json.
A stored value that doesn't match the schema throws JsonColumnError on read by default. For columns that already have rows, use invalid: "null" or a fallback.
Rows returned by writes never throw; they come back as stored.
DbNull is refused on non-nullable typed columns, and so is JsonNull unless the schema accepts null.
See docs/orm.md.