Closed janpio closed 3 years ago
I am assuming this issue is regarding improvement of the error message and I am marking it as a improvement.
No, this was about the questions why Introspection should fail based on existing content in your schema that would be overwritten. Why do I have to fix that first to overwrite it anyway?
(The error message deserves an additional issue as well though - probably happens on prisma generate
with that schema as well)
@do4gr says this should now work fine. Please reconfirm @pantharshit00
I am still able to reproduce this in 2.7.0
This is intended behavior. There is the --force flag to ignore the schema. If that is not provided we want to return the errors we find. Please confirm again @pantharshit00 and re-open in case that does not work.
@do4gr Can we improve the error message here?
I mean even it was tough for me guess what is going on here so I wouldn't expect a user to get around.
As far as I am aware the error message should indeed point you towards --force
instead of just dumping a raw error message like the one you showed above @pantharshit00.
This is no longer reproducible in latest version 2.21.2
This is how it looks like now
Problem
Right now if when you run
prisma introspect
and your schema has a syntax error, it errors out. This is kind of unnecessary overhead, since the schema will be overridden anyway. It appears like we validate the existing schema before overriding it.How to Reproduce
Schema when running
prisma introspect
:Leads to error: