Add SetDefault
validation error with warnings when provider = "mysql"
and relationMode = "foreignKeys" | default
#16259
Labels
kind/tech
A technical change.
team/schema
Issue for team Schema.
topic: mysql
topic: referential actions
topic: schema validation
Milestone
We recently wanted to forbid MySQL users from defining
SetDefault
referential actions in the Prisma schema in prisma/prisma-engines#3363, as they are not supported by InnoDB (the only MySQL storage engine we support). However, as they are still accepted by MySQL when creating/altering a table, validating againstonUpdate: SetDefault
oronDelete: SetDefault
would be a breaking change. More details available here.We have thus decided to close the PR above and to implement validation via warnings instead.
Warnings should be implemented in the engines and then consumed by the Prisma extension and the Prisma CLI (e.g. in
format
andvalidate
), but the details of that have yet to be decided (as they depend on https://github.com/prisma/prisma-private/issues/200).The text was updated successfully, but these errors were encountered: