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
Schema Validation fails with panic thread 'main' panicked at 'Expected ID field ... to be present on the model'
#1681
Comments
alpha.820
: thread 'main' panicked at 'Expected ID field name1 to be present on the model'
alpha.820
: thread 'main' panicked at 'Expected ID field ... to be present on the model'
alpha.820
: thread 'main' panicked at 'Expected ID field ... to be present on the model'
alpha.820
: Schema Validation fails with panic thread 'main' panicked at 'Expected ID field ... to be present on the model'
alpha.820
: Schema Validation fails with panic thread 'main' panicked at 'Expected ID field ... to be present on the model'
thread 'main' panicked at 'Expected ID field ... to be present on the model'
This for example happens for this SQLite file: https://github.com/prisma/introspection-engine-output/blob/master/sqlite_dbs/chinook.db
The model looks like this:
|
A similar panic is reproducible with this smaller schema:
|
ProblemQuery Engine tries to create the "Input Types" by looking at DecisionAllow Temporary GuardrailDrop the relation on the (currently) non scalar field to make it a scalar field, that is supported already. Write a comment "next" to the field to communicate to the user what happened. |
thread 'main' panicked at 'Expected ID field ... to be present on the model'
thread 'main' panicked at 'Expected ID field ... to be present on the model'
The general bug is fixed here with the recent merges and active with the merge of prisma/prisma-engines#578. (For now it is unclear how the test-utils links here actually were relevant, @divyenduz will look into those.) |
@janpio tl;dr; the relation to test-utils here is only that we found this out when trying test-utils out and mass generating. Query generator would have shown same results. |
Many database schemas that used to validate with 0 errors, now crash with a Rust Panic similar to this one:
(Internal Link: https://github.com/prisma/introspection-engine-output/commit/2356683bf674ef25defe7d1918e3b4f4c9a31735)
(Update: 90 schemas are affected)
The text was updated successfully, but these errors were encountered: