vevcom / projectNext

Project Next is Omegas new website coming soon
MIT License
6 stars 1 forks source link

Refactor/split prisma schema #269

Closed Paulijuz closed 2 months ago

Paulijuz commented 2 months ago

FINALLY!

I split the schema file into multiple files based on the categories we already had. I don't know if this is the best way as some of the categories only have one model (for example "omegaOrder") so feedback is greatly appreciated.

I also had to move the schema from omegaweb down into its own folder as it was confusing the vs code extension when editing the schema for pn. The reason is that:

[...] this is an artifact of how the VS Code extension detects the parent or main schema folder. It goes up until it does not find a .prisma file anymore. The CLI and other tooling gets an explicit Prisma schema path via --schema or some other configuration, so it knows that main folder out of the box. The VS Code extension unfortunately does not, which is why we need that logic.

Source: https://github.com/prisma/prisma/discussions/24413#discussioncomment-9675798