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

Mapped field name #40

Closed
erlanggadewa opened this issue Sep 28, 2022 · 3 comments
Closed

Mapped field name #40

erlanggadewa opened this issue Sep 28, 2022 · 3 comments

Comments

@erlanggadewa
Copy link

there is an option to use mapped field name into the database?

@marcjulian
Copy link
Member

Do you mean @map(...)?

model User {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now()) @db.DateTime(0)
  updatedAt DateTime @updatedAt @map("updated_at") 👈
  email     String   @unique
  name      String?  @db.VarChar(255)
}

Last time I checked #18 (comment) only @@map(...) was included in the DMMF schema from prisma.

@erlanggadewa
Copy link
Author

yes sir, can you add @Map(...) in DMFF schema from prisma ?
thank you

@marcjulian
Copy link
Member

marcjulian commented Sep 29, 2022

@erlanggadewa if you want @map(...) to be included in the DMMF you need to open an issue in the prisma repo. I will closes this as it's a duplicate of #18.

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

No branches or pull requests

2 participants