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

Antti| User model to schema.prisma file #16

Merged
merged 7 commits into from
Mar 7, 2024
Merged

Conversation

anttiasmala
Copy link
Collaborator

@anttiasmala anttiasmala commented Mar 3, 2024

Model lisätty käyttäjille schema.prisma-tiedostossa. Laitoin tämänkin main-branchiin vetämään, koska ei varsinaista tuotantoa ole vielä

Copy link

vercel bot commented Mar 3, 2024

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

Name Status Preview Comments Updated (UTC)
lahjalista ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2024 10:55am

createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
authorEmail String?
author User? @relation(fields: [authorEmail], references: [email])
Copy link
Collaborator Author

@anttiasmala anttiasmala Mar 3, 2024

Choose a reason for hiding this comment

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

Olisiko uuid:lla parempi yhdistää lahja? Sähköposti voi vaihtua, uuid ei

Edit: vai olisko monella yhdistäminen vielä parempi?

Copy link
Owner

Choose a reason for hiding this comment

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

Ehdottomasti ennemmin uuid:lla. Primary key on se millä relaatiot tehdään, eli oikeastaan id olisi oikeaoppinen kenttä relaatioille, mutta uuid toimii myös.

@anttiasmala anttiasmala requested a review from samuliasmala March 3, 2024 19:37
@anttiasmala anttiasmala linked an issue Mar 3, 2024 that may be closed by this pull request
Copy link
Owner

@samuliasmala samuliasmala left a comment

Choose a reason for hiding this comment

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

Muutetaan relaatio käyttämään uuid:tä ja lisätään migraatio tarvittaville tietokantamuutoksille, muuten näytti hyvältä.

@anttiasmala
Copy link
Collaborator Author

Nyt pitäisi olla schema.prisma-tiedosto korjattu. Vaihdoin authorin useriksi. Author lienee parempi, jos on viesteistä kyse.

Onko tuo migration semmoinen mitä ajattelit?

@anttiasmala anttiasmala requested a review from samuliasmala March 5, 2024 11:14
@anttiasmala anttiasmala mentioned this pull request Mar 5, 2024
Copy link
Owner

@samuliasmala samuliasmala left a comment

Choose a reason for hiding this comment

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

Nyt näyttää hyvältä! User on parempi kuin author ja migraatio juuri sellainen kuin ajattelin 👍

@samuliasmala samuliasmala merged commit f11b2d9 into main Mar 7, 2024
5 checks passed
@samuliasmala samuliasmala deleted the antti/user-model branch March 7, 2024 19:19
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.

3. Tehdään tietokantarakenne käyttäjille
2 participants