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

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open

Using Prisma file alongside Wasp #2035

wants to merge 77 commits into from

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

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
infomiho and others added 5 commits June 19, 2024 00:08
…be used for) (#2094)

* Made waspc/examples/todoApp easier to run (docs + env files).

* Added .env.server management via dotenv-vault.

* Documented how to test compilation and building of todoApp.

* Updated PR template to mention example todo apps.

* fix

* Apply suggestions from code review

* Update waspc/README.md

* fix

* Update waspc/examples/todoApp/.gitignore
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.

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.

Create a Prisma file POC
2 participants