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

Add db.provider to replace db.adapter #5368

Merged
merged 2 commits into from
Apr 6, 2021
Merged

Add db.provider to replace db.adapter #5368

merged 2 commits into from
Apr 6, 2021

Conversation

timleslie
Copy link
Contributor

Now that we only support Prisma the question isn't "which keystone adapter do you want?" as much as "which Prisma provider do you want to use?". This deprecates db.adapter, which will be removed in the next release.

@vercel
Copy link

vercel bot commented Apr 6, 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/5hYigkwMaU8xts8Z6CKMSSX34Nt7
✅ Preview: https://keystone-next-docs-git-prisma-provider-keystonejs.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Apr 6, 2021

🦋 Changeset detected

Latest commit: 64ed79d

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

This PR includes changesets to release 13 packages
Name Type
@keystone-next/website Minor
@keystone-next/keystone Minor
@keystone-next/types Minor
@keystone-next/test-utils-legacy Patch
@keystone-next/auth Major
@keystone-next/example-auth Patch
@keystone-next/app-basic Patch
@keystone-next/example-ecommerce Patch
keystone-next-app Patch
@keystone-next/example-roles Patch
@keystone-next/example-sandbox Patch
@keystone-next/example-todo 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 April 6, 2021 00:42 Inactive
adapter: 'prisma_postgresql';
provider?: undefined;
}
| { adapter?: undefined; provider: 'postgresql' }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mitchellhamilton Is there a better way of saying "one or the other, but not both"?

Copy link
Member

Choose a reason for hiding this comment

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

Not really

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 6, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 64ed79d:

Sandbox Source
@keystone-next/example-sandbox Configuration

@vercel vercel bot temporarily deployed to Preview April 6, 2021 00:53 Inactive
@timleslie timleslie requested a review from a team April 6, 2021 00:55
@vercel vercel bot temporarily deployed to Preview April 6, 2021 00:55 Inactive
Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

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

Just want to explicitly block this on my review while I check things because I think I will have comments

Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

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

Looks fine except for the @deprecated bit: can you remove the colon(it doesn't make sense and looks weird when shown in editors) and add the @deprecated comment to both the adapter?: undefined cases so that the adapter option shows as deprecated in autocomplete (currently in this PR, it doesn't look like this)?
Screen Shot 2021-04-06 at 11 13 11 am

@vercel vercel bot temporarily deployed to Preview April 6, 2021 01:25 Inactive
@timleslie timleslie requested a review from emmatown April 6, 2021 01:25
@timleslie timleslie enabled auto-merge (squash) April 6, 2021 01:25
@timleslie timleslie merged commit b400163 into master Apr 6, 2021
@timleslie timleslie deleted the prisma-provider branch April 6, 2021 01:30
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