Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SetDefault validation error with warnings when provider = "mysql" and relationMode = "foreignKeys" | default #16259

Closed
jkomyno opened this issue Nov 14, 2022 · 0 comments · Fixed by prisma/prisma-engines#3435

Comments

@jkomyno
Copy link
Contributor

jkomyno commented Nov 14, 2022

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 against onUpdate: SetDefault or onDelete: 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 and validate), but the details of that have yet to be decided (as they depend on https://github.com/prisma/prisma-private/issues/200).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants