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

Help Article: Implicit to Explicit Conversion #4768

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

Conversation

nurul3101
Copy link
Member

Help article for converting implicit many-to-many relations to explicit many-to-many

What issue does this fix?

Converting implicit many-to-many relations to explicit many-to-many
@vercel
Copy link

vercel bot commented May 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 13, 2023 1:38pm

@github-actions
Copy link
Contributor

github-actions bot commented May 12, 2023

This PR changes the following pages (Vercel Preview Deploy links):

Changed Vercel links

(Note that links will only be valid after Vercel preview deploy succeeded)

@github-actions
Copy link
Contributor

This PR probably requires the following redirects to be added to vercel.json:

  • This PR does not change any pages in a way that would require a redirect.

Copy link
Member

@nikolasburk nikolasburk left a comment

Choose a reason for hiding this comment

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

we should change jsx to prisma on the code blocks but otherwise it looks good 👍

Updated code snippets with appropriate extensions
@nurul3101 nurul3101 marked this pull request as ready for review August 31, 2023 10:28
@nurul3101 nurul3101 self-assigned this Aug 31, 2023
@nurul3101
Copy link
Member Author

I have made the change in code blocks. If it looks good, we can go ahead and merge it.

Copy link
Member

@janpio janpio left a comment

Choose a reason for hiding this comment

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

Deployment failed.
Page is missing file extension and front matter.

@janpio
Copy link
Member

janpio commented Aug 31, 2023

Ugh, how the deployment fails on Vercel is scary:

npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR! 
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login
npm ERR! A complete log of this run can be found in:
npm ERR!     /vercel/.npm/_logs/2023-08-31T17_54_41_543Z-debug-0.log
Error: Command "npm install" exited with 1
image

Comment on lines +19 to +31
```prisma
model User {
id Int @id @default(autoincrement())
name String
posts Post[]
}

model Post {
id Int @id @default(autoincrement())
title String
authors User[]
}
```
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be helpful to actually show the SQL of the underlying relation table here. Fundamentally, this guide needs to teach how the already existing relation table is being surfaced in the Prisma schema.

@nikolasburk
Copy link
Member

Question: Right now, the guide teaches how to create a new model to represent the relation table. Wouldn't it be possible to just reuse the already existing relation table that Prisma maintains for you?

nurul3101 and others added 8 commits September 5, 2023 16:25
…articles/800-implicit-to-explicit-conversion.mdx

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
…articles/800-implicit-to-explicit-conversion.mdx

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
…articles/800-implicit-to-explicit-conversion.mdx

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
…articles/800-implicit-to-explicit-conversion.mdx

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
…articles/800-implicit-to-explicit-conversion.mdx

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants