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

feat(prisma): Support multi file Prisma schemas #10869

Merged
merged 24 commits into from
Jul 19, 2024
Merged

Conversation

dthyresson
Copy link
Contributor

@dthyresson dthyresson commented Jun 21, 2024

feat(prisma): Support multi file Prisma schemas (#10869) by @dthyresson

Prisma's prismaSchemaFolder feature allows you to define multiple files in a schema subdirectory of your prisma directory.

This PR updates:

  • Prisma utilities
  • generators
  • dbAuth setup
  • documentation

to support single and multi file Prisma schemas.

If you have enabled Prisma multi file schemas, you configure your project toml api schemaPath setting the directory where your schema.prisma can be found, for example: './api/db/schema'

When organizing your Prisma Schema into multiple files, you will need enable that feature in Prisma, move your schema.prisma file into a new directory such as ./api/db/schema and then set schemaPath in the api toml config.
:::

For example:

[api]
  port = 8911  
  schemaPath = "./api/db/schema"

@dthyresson dthyresson added release:feature This PR introduces a new feature changesets-ok Override the changesets check labels Jun 21, 2024
@dthyresson dthyresson added this to the next-release milestone Jun 21, 2024
@dthyresson dthyresson self-assigned this Jun 21, 2024
@dthyresson dthyresson changed the title DRAFT - feat(prisma): Support multi file Prisma schemas feat(prisma): Support multi file Prisma schemas Jun 29, 2024
@dthyresson dthyresson removed the changesets-ok Override the changesets check label Jun 29, 2024
@dthyresson dthyresson marked this pull request as ready for review June 29, 2024 19:58
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

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

Sorry for the delayed review on this. I have some comments but mostly just seeking some clarification for my own benefit. I don't intend to come across as nit-picky so sorry in advance if I do so!

packages/cli/src/lib/schemaHelpers.js Outdated Show resolved Hide resolved
packages/cli/src/commands/setup/deploy/providers/render.js Outdated Show resolved Hide resolved
packages/cli/src/lib/schemaHelpers.js Outdated Show resolved Hide resolved
packages/cli/src/lib/schemaHelpers.js Show resolved Hide resolved
packages/record/src/tasks/parse.js Show resolved Hide resolved
@Josh-Walker-GM Josh-Walker-GM merged commit cf4dc76 into main Jul 19, 2024
46 checks passed
@Josh-Walker-GM Josh-Walker-GM deleted the dt-prisma-multi-file branch July 19, 2024 20:03
@Josh-Walker-GM Josh-Walker-GM modified the milestones: next-release, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants