(schema validation): Warn against referential action choices that do not make sense #7909
Labels
kind/feature
A request for a new feature.
team/schema
Issue for team Schema.
topic: referential actions
Problem
With the
referentialActions
preview feature, some combinations of relations and relational actions make more sense than others. For example,SetNull
on a required relation will (should) always fail at runtime.Restrict
on a nullable relation is possible, but tricky to justify.Suggested solution
The schema validation should display a warning when one of these actions does not make sense, through the editor extension.
Alternatives
We could make this a validation error, but since the databases we support accept these combinations, it would mean that introspection would result in broken schemas.
Additional context
referentialActions
) #7816The text was updated successfully, but these errors were encountered: