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

[Feature Request]: Improve prisma naming conventions #1153

Closed
tobiasdiez opened this issue Sep 24, 2023 · 2 comments
Closed

[Feature Request]: Improve prisma naming conventions #1153

tobiasdiez opened this issue Sep 24, 2023 · 2 comments
Labels
feature request New feature requests

Comments

@tobiasdiez
Copy link
Contributor

Description

For prisma, typically model fields are specified in camel case (https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#model-fields) and one-to-many relations use plural for the field name (https://www.prisma.io/docs/concepts/components/prisma-schema/relations/one-to-many-relations).
Thus it would be nice if one could specify/change the names to

model User {
  ....
  keys Key[] //Renamed
}

model Key {
  id String  @id @unique
  hashedPassword String? // Renamed
  userId String // Renamed
  user User @relation(references: [id], fields: [userId], onDelete: Cascade)

  @@index([userId])
}
@pilcrowOnPaper
Copy link
Member

pilcrowOnPaper commented Sep 24, 2023

I'm aware of this issue and it will be addressed with #1152

tobiasdiez added a commit to JabRef/JabRefOnline that referenced this issue Sep 24, 2023
- Once redis/ioredis#1822 is fixed, remove
patch to ioredis
- Once Azure/azure-functions-host#162 is
fixed, remove patch to nitro that wraps console log.
- Once unjs/nitro#1753 is merged and released,
remove corresponding patch to nitro
- Once lucia-auth/lucia#1153 is fixed, rename
models/fields in prisma
- Once lucia-auth/lucia#1155 is merged and
released, remove custom h3 lucia middleware
- Once lucia-auth/lucia#1074 is fixed, remove
lucia types shims
- Enable CSRF protection in lucia (but then login doesn't work
anymore...)
@pilcrowOnPaper pilcrowOnPaper linked a pull request Nov 16, 2023 that will close this issue
6 tasks
@pilcrowOnPaper
Copy link
Member

pilcrowOnPaper commented Jan 20, 2024

Addressed in v3 (beta)

@pilcrowOnPaper pilcrowOnPaper removed a link to a pull request Jan 26, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants