schema.prisma dont respect previewFeatures

Im using in prisma: previewFeatures = ["postgresqlExtensions", "prismaSchemaFolder"] for larger project one schema file is impossible to manage specially in bigger teams.
6 Replies
kapa.ai
kapa.ai4w ago
Hi @fooosieee. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, I can address your concern about Prisma preview features in Wasp. Wasp currently supports specifying Prisma preview features, including "postgresqlExtensions", through the app.db.prisma.clientPreviewFeatures field in the main.wasp file. Here's an example of how you can enable this feature:
app MyApp {
// ...
db: {
system: PostgreSQL,
prisma: {
clientPreviewFeatures: ["postgresqlExtensions"]
}
}
}
app MyApp {
// ...
db: {
system: PostgreSQL,
prisma: {
clientPreviewFeatures: ["postgresqlExtensions"]
}
}
}
Wasp Docs: Prisma Configuration (https://wasp-lang.dev/docs/data-model/backends#prisma-configuration) However, the knowledge sources don't mention support for the "prismaSchemaFolder" preview feature or the ability to split the schema into multiple files. This limitation is acknowledged in the Wasp community, and there's an ongoing discussion about improving Prisma support in Wasp. Regarding your concern about managing larger projects with a single schema file, you're not alone in this sentiment. There's an open issue in the Wasp GitHub repository discussing the expansion of Prisma support, including better handling of Prisma features and potentially allowing customization of the Prisma schema: GitHub Issue: Expand our Prisma support (https://github.com/wasp-lang/wasp/issues/641) One of the comments in this issue mentions a user who would prefer to have a separate schema.prisma file at the root with all Prisma features, rather than handling it in main.wasp. While Wasp doesn't currently support splitting the Prisma schema into multiple files, the development team is aware of these limitations and is considering improvements. For now, you might need to work within the constraints of Wasp's current Prisma implementation or consider alternative approaches for managing your schema in larger projects. If this limitation is a significant issue for your project, you may want to reach out to the Wasp community or contribute to the ongoing discussions about improving Prisma support in Wasp. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @fooosieee, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Filip
Filip3w ago
@kapa.ai This answer is outdated. Prisma has since been moved to its own schema file. @fooosieee Hm, strange. Which feature doesn't work, or is it all of them? Seems to me they work, but one particular feature might be problematic (the one with multiple files). Can you confirm postresqlExtensions work fine?
kapa.ai
kapa.ai3w ago
Let me check the knowledge base for you again. One moment! :books:
fooosieee
fooosieeeOP3w ago
multischema and prismaSchemaFolder
martinsos
martinsos3w ago
Yeah I believe the issue will be with prismaSchemaFolder, we on the Wasp side don't currently support multiple schema files! But we will want to do it soon anyway. I will create an issue for it.
martinsos
martinsos3w ago
Opened an issue for this here https://github.com/wasp-lang/wasp/issues/2397
GitHub
Prisma now supports multiple Prisma schema files (prismaSchemaFolde...
They added support for multiple files, as long as they are in a directory that you specify, but we haven't followed up with that in Wasp, we are still assuming there is only a single file. We s...
Want results from more Discord servers?
Add your server