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
fix: re-introspection now preserves 'referentialIntegrity' policy #3337
fix: re-introspection now preserves 'referentialIntegrity' policy #3337
Conversation
introspection-engine/introspection-engine-tests/tests/re_introspection/relation_mode/mssql.rs
Outdated
Show resolved
Hide resolved
...ospection-engine/introspection-engine-tests/tests/re_introspection/relation_mode/postgres.rs
Outdated
Show resolved
Hide resolved
introspection-engine/introspection-engine-tests/tests/re_introspection/relation_mode/sqlite.rs
Outdated
Show resolved
Hide resolved
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.
Looks good! Let's get a review from someone working in engines before we merge
introspection-engine/datamodel-renderer/src/configuration/datasource.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
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! Just the one minor changes in tests (the no_relation_mode
ones) left
Before this PR, the
referentialIntegrity = "prisma"
orreferentialIntegrity = "foreignKeys"
information in thedatasource
block was lost during re-introspection. This was caused by us renaming thereferentialIntegrity
field torelationMode
, while keeping the preview feature name asreferentialIntegrity
.Now, if the input schema has, e.g.,
referentialIntegrity = "prisma"
, the re-introspected schema keeps this value under the renamed linerelationMode = "prisma"
.Fixes prisma/prisma#16007.