-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expand our Prisma support (enum, type, other dbs, ...) #641
Comments
Since Prisma 4.9, Prisma now also has Views! https://twitter.com/ryanchenkie/status/1616487561169440769 So we should also look into that. |
Makes sense to solve this together with #887 . |
To address this, I used the existing seeder functionality as a workaround to execute a function that created the enum. This make me think if it would perhaps be more efficient to add direct support for executing DDL scripts within the framework? Instead of continually expanding support for every specific Prisma modeling feature, a combination of DML (seeder functions) and DDL capabilities could provide a very robust and flexible solution. I believe this approach would cover the vast majority of use cases. |
That is an interesting idea! But it is a bit hacky, and the solution we have in mind to fix all this goes the other way -> it lets you write Prisma directly in Prisma files, which should solve all of these issues. So let's see how that goes, and if that works we rae great, if not I think we can examine your suggestion again! |
User asking for Enums: https://discord.com/channels/686873244791210014/1220352081970466908/1220607862078836766. The same user is also not a fan of having Prisma stuff inside Wasp and would prefer a separate schema.prisma file (the message below the linked one). Full quote:
|
Nice, ok that is the plan! |
One more relevant comment: https://discord.com/channels/686873244791210014/920312576133443634/1220434636824514722 |
This doesn't add support for |
@infomiho how is it that we can't use |
Our parser doesn't yet support views or types, when we add support it will work 👍 |
We have support for views and type since #2179 |
Wasp is heavily using Prisma for the DB layer of web app, but it doesn't yet utilize everything that Prisma offers. Here we can track some of the bigger items that we recognize would be cool to support in the future when we are ready / feel the need for them:
enum
andtype
declarations in PSL.enum
we should certainly add, whiletype
is for now used for MongoDB, so probably no rush until we decide to also support MongoDB, or untiltype
gets wider usage. Btwtype
is interesting since it pushes PSL closer to being the full data schema, closer to what GQL can do, and closer to what Wasp will need in the future in any case.The text was updated successfully, but these errors were encountered: