Prisma schema: Remove empty dbgenerated()
attribute
#19313
Labels
kind/tech
A technical change.
team/schema
Issue for team Schema.
tech/engines
Issue for tech Engines.
topic: breaking change
topic: dbgenerated
topic: default
Example
In the times of old, an empty
dbgenerated()
in a@default
field attribute was used by the introspection in fields, where we could not parse the default value correctly. Later on in the migration engine, we started to use it to pass custom SQL, and an empty value is in general just skipped.In the real world, an empty
dbgenerated()
can cause drift and weird panics. We allow it in the PSL for backwards-compatibility. We should make it a validation error. The user can justdb pull
the database and get a non-empty value to the field’s default attribute.dbgenerated()
still breaking forUnsupported()
types #15654The text was updated successfully, but these errors were encountered: