Skip to content
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

Using Prisma file alongside Wasp #2035

Merged
merged 85 commits into from
Jul 3, 2024
Merged

Using Prisma file alongside Wasp #2035

merged 85 commits into from
Jul 3, 2024

Conversation

infomiho
Copy link
Contributor

@infomiho infomiho commented May 16, 2024

This is some highly experimental work to move entities outside of the Wasp file and to put them in a regular schema.prisma file.

In this PR we:

  • extend the model parser to parse lists of Prisma models
  • extend the PSL parser to include enums
  • parse the Prisma file and:
    • store the Prisma schema in AppSpec
    • inject the entities from Prisma file to the Wasp AST
  • extend the LS to watch and parse the Prisma file as well
  • we use DB extensions from the Prisma file directly
  • we use the DB provider from the Prisma file directly

Closes #2002
Closes #2137

Left to do

Probably in a separate PR

  • Update the docs
    • Data model docs
    • Tutorial
    • Any other part that mentions entities
  • Write new migration docs
  • Starter templates
    • Embeddings template
    • Open SaaS template
    • Todo Typescript template
  • Example apps
    • waspc/examples apps
    • examples/ apps
    • headless tests app

@Martinsos
Copy link
Member

Awesome stuff @infomiho ! Anything specific you want looked at at the moment, or is all good for now?

@infomiho infomiho force-pushed the miho-prisma-file branch 3 times, most recently from 610ff31 to aea13d3 Compare May 25, 2024 06:11
Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@infomiho left some more comments, I think this should be the last round! We are super close now, awesome!

Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wohooo that is it, nice! I didn't do a final sweep through all the code, if you want to do that you can, maybe it is not needed though. Anyway, great job! You can merge.

@infomiho infomiho merged commit 8ead2e0 into main Jul 3, 2024
6 checks passed
@infomiho infomiho deleted the miho-prisma-file branch July 3, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prisma support for dbgenerated UUID field Create a Prisma file POC
2 participants