What's Changed
Strict Custom Types
Custom types can now be marked with the new @@strict attribute to reject unknown fields. Strictness is reflected both in TypeScript typing (intellisense) and runtime input validation, and also works with custom procedures. Contributed by @sanny-io 🎉
model User {
id String @id @default(uuid())
profile Profile? @json
}
type Profile {
bio String
@@strict
}Lite Schemas Now Retain Validation Attributes
zen generate --lite previously stripped all attributes from the generated schema, which broke input validation and frontend hooks that rely on @default/@updatedAt. Lite schemas now retain validation attributes, @meta/@@meta, @default, and @updatedAt. Contributed by @sanny-io 🎉 (#2793, #2764)
Full Changelog: v3.9.1...v3.9.2