-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improve handling of invalid Prisma schemas #805
Comments
|
I was able to reproduce this bug @vincanger, nice find! Will look into if this is a regression or something we never actually supported next. 👍🏻 |
Ok, so it turns out this is not actually a Wasp or Prisma bug per se. Wasp does support optional modifiers (they are used in some sample apps, and even in this example for | Note: You cannot combine type modifiers - optional lists are not supported. So I guess the correct behavior would be for us to show an error to the user, ideally, instead of just skipping whatever follows it. I will leave this open so we can improve this behavior in the future. 👍🏻 |
@vincanger noted VS Code will give a warning if it was just a Prisma schema file. This is a good use case for extending our |
Describe the bug
I've already spoken with @shayneczyzewski about something I've been noticing with Prisma Entities.
It seems some fields aren't being recognized/compiled by Wasp depending on where they are within the entity object:
For example, I didn't notice these two properties in Prisma Studio until I bumped them up to the top of the Entity object (see screenshot). I'm also quite sure I created these properties when I initially created the Entity. After bumping them up to the top of the entity object, I finally get the migrate DB message:
👀 ---- Your Prisma schema has changed, please run
wasp db migrate-devwhen ready.
If I migrate the DB and then move the fields back down again, I get a
drop tables
warning. Maybe fields after a field with the "?" are affected? 🤷♂️The text was updated successfully, but these errors were encountered: