-
-
Notifications
You must be signed in to change notification settings - Fork 499
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(postgres): allow defining deferred FK constraints #5384
Conversation
0092f37
to
2b16f54
Compare
2b16f54
to
d596a3d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5384 +/- ##
========================================
Coverage 99.71% 99.71%
========================================
Files 222 222
Lines 17049 17061 +12
Branches 3967 4195 +228
========================================
+ Hits 17000 17013 +13
+ Misses 49 48 -1 ☔ View full report in Codecov by Sentry. |
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, thanks!
can you please also test schema diffing? either in the test you added or by updating this one:
tests/features/deferrable-constraints/deferrable-constraints.postgres.test.ts
Outdated
Show resolved
Hide resolved
tests/features/deferrable-constraints/deferrable-constraints.postgres.test.ts
Outdated
Show resolved
Hide resolved
tests/features/deferrable-constraints/deferrable-constraints.postgres.test.ts
Outdated
Show resolved
Hide resolved
…ostgres.test.ts Co-authored-by: Martin Adámek <banan23@gmail.com>
…ostgres.test.ts Co-authored-by: Martin Adámek <banan23@gmail.com>
…ostgres.test.ts Co-authored-by: Martin Adámek <banan23@gmail.com>
all right, thanks again! |
This PR adds the option to specify constraints as deferrable for relations.
On OneToOne and ManyToOne relations you can now specify a
deferMode
property, which can be eithernot deferrable
(default),immediate
ordeferred
. Those are also covered by a newDeferMode
enum.Closes #5306