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

Do not introspect exclusion constraints as Gist indexes #17515

Closed
janpio opened this issue Jan 24, 2023 · 1 comment
Closed

Do not introspect exclusion constraints as Gist indexes #17515

janpio opened this issue Jan 24, 2023 · 1 comment
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. topic: exclusion constraint topic: introspection
Milestone

Comments

@janpio
Copy link
Member

janpio commented Jan 24, 2023

#15173 showed that we currently introspect exclusion constraints incorrectly as Gist indexes.

Until we add explicit support for them via #17514, we should at leat not introspect them as indexes but just skip them and maybe output a warning to the user on how to handle this unsupported type of constraint in the meantime.

@jkomyno
Copy link
Contributor

jkomyno commented Apr 6, 2023

Note:

  • if EXCLUDE has a WHERE clause, it’s not introspected
  • if EXCLUDE doesn’t have a WHERE clause but refers to columns via immutable functions, it’s not introspected
  • if EXCLUDE doesn’t have a WHERE clause and refers to columns directly, regardless of whether their type is supported by Prisma, it’s introspected

This is true for both prisma@4.3.1 and prisma@4.12.0.
See Slack thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. topic: exclusion constraint topic: introspection
Projects
None yet
Development

No branches or pull requests

2 participants