-
Notifications
You must be signed in to change notification settings - Fork 218
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(schema-engine): CHECK
and EXCLUDE
constraints stopgap for Postgres
#3860
Conversation
…exclusion constraints in postgres
CodSpeed Performance ReportMerging #3860 Summary
|
…onstraints when introspecting postgres
CHECK
constraints stopgap for PostgresCHECK
and EXCLUDE
constraints stopgap for Postgres
schema-engine/connectors/sql-schema-connector/src/warnings/generators.rs
Outdated
Show resolved
Hide resolved
schema-engine/connectors/sql-schema-connector/src/warnings/generators.rs
Outdated
Show resolved
Hide resolved
…usion constraints
…straints now adds a comment to such models
…lusion constraints
…prisma/prisma-engines into feat/postgres-check-constraints-stopgap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but I wonder if @tomhoule or anyone else could confirm that they had at least a quick look as well.
There's one nitpick comment below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A few minor things but this is looking good, with the other PR that addresses the extra roundtrip (will have a look there next).
schema-engine/connectors/sql-schema-connector/src/warnings/generators.rs
Outdated
Show resolved
Hide resolved
schema-engine/connectors/sql-schema-connector/src/warnings/generators.rs
Outdated
Show resolved
Hide resolved
…nt and ExclusionConstraint
…upsert" capabilities
* Exclude constraints are PG only, lighten up the api * Split constraint tests into its own file * Fix describer tests
@@ -12,6 +12,7 @@ WITH rawindex AS ( | |||
WHERE | |||
indpred IS NULL -- filter out partial indexes | |||
AND array_position(indkey::int2[], 0::int2) IS NULL -- filter out expression indexes | |||
AND NOT indisexclusion -- filter out exclusion constraints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we actually do exclusions here instead?
you also want to rebase with main to get rid of flaky vitess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure this does not get merged in 4.13.0 accidentally
yep lots of changes since yesterday too, I'll do another review before we can merge |
Fyi, I have pulled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
Could you please remove "requested changes" now? It's blocking the merge :) |
Notion Details:
Note: the stopgap implementation for
Check
constraints is exactly the same as the one forExclusion
constraints for Postgres. Hence why they were implemented at the same time.In terms of introspection warning codes:
CHECK
: 33EXCLUDE
: 34TODOs
EXCLUSION
andCHECK
constraints couldn't be added as they're not supported