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

Fix crash if the prisma client directory exists but the prisma schema doesn't #4984

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Mar 2, 2021

Found this when writing tests for the examples. Also made it so the checking logic does fewer file system operations.

I would write a test for this but I couldn't find a nice place for it where there are tests for generating migrations or something?

@emmatown emmatown requested a review from timleslie March 2, 2021 00:19
@vercel
Copy link

vercel bot commented Mar 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/BDTHunQDPEkHigNhZg8ww29EADQQ
✅ Preview: Failed

[Deployment for fb57a06 failed]

@changeset-bot
Copy link

changeset-bot bot commented Mar 2, 2021

🦋 Changeset detected

Latest commit: fb57a06

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@keystonejs/adapter-prisma Patch
@keystone-next/keystone Patch
@keystonejs/test-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel vercel bot temporarily deployed to Preview March 2, 2021 00:23 Inactive
@emmatown emmatown changed the title Fix crash if the prisma client directory existed but the prisma schema didn't Fix crash if the prisma client directory exists but the prisma schema doesn't Mar 2, 2021
@vercel vercel bot temporarily deployed to Preview March 2, 2021 00:30 Inactive
@timleslie
Copy link
Contributor

I would write a test for this but I couldn't find a nice place for it where there are tests for generating migrations or something?

At the moment we don't have tests of the migration paths. We exercise the adapter through the API tests, but these take advantage of the prototype mode, not any of the actual migration code.

Writing tests for actual migrations is something we definitely need, but can be considered out of scope for this PR 👍

Copy link
Contributor

@timleslie timleslie left a comment

Choose a reason for hiding this comment

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

👍

@emmatown emmatown merged commit f826f15 into master Mar 2, 2021
@emmatown emmatown deleted the fix-prisma-adapter-crashing-if-the-prisma-directory-exists-but-not-the-schema branch March 2, 2021 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants