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

feat(psl): polish validation warnings before relationMode GA #3446

Merged
merged 8 commits into from Nov 27, 2022

Conversation

jkomyno
Copy link
Contributor

@jkomyno jkomyno commented Nov 25, 2022

Closes prisma/prisma#16440.

  • SetDefault on mysql
    """
    MySQL does not actually support the SetDefault referential action, so using it may result in unexpected errors. Read more at https://pris.ly/d/mysql-set-default
    """

  • SetNull on postgres
    """
    The onDelete referential action of a relation should not be set to SetNull when a referenced field is required. We recommend either to choose another referential action, or to make the referenced fields optional. Read more at https://pris.ly/d/postgres-set-null
    """

  • Missing indexes on relationMode = "prisma"
    """
    With relationMode = "prisma", no foreign keys are used, so relation fields will not benefit from the index usually created by the relational database under the hood. This can lead to poor performance when querying these fields. We recommend adding an index manually. Learn more at https://pris.ly/d/relation-mode-prisma-indexes
    """

@jkomyno jkomyno added this to the 4.7.0 milestone Nov 25, 2022
@jkomyno jkomyno added the team/schema Issue for team Schema. label Nov 25, 2022
@jkomyno jkomyno marked this pull request as ready for review November 25, 2022 15:22
@jkomyno jkomyno requested a review from a team as a code owner November 25, 2022 15:22
Copy link
Member

@janpio janpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note comment

jkomyno and others added 2 commits November 25, 2022 17:44
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
@jkomyno
Copy link
Contributor Author

jkomyno commented Nov 27, 2022

@jkomyno jkomyno merged commit 4662162 into main Nov 27, 2022
@jkomyno jkomyno deleted the feat/polish-validation-warnings branch November 27, 2022 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team/schema Issue for team Schema.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polish relationMode validation warning messages
3 participants