Prisma generates database tables with uppercase in mysql. Is there any way to generate tables only in lowercase?

Viewed 1199

Prisma generates database tables with uppercase in MySQL. Is there any way to generate tables only in lower case?

1 Answers

At the moment you have to do that manually with @map and @@map.

You can read more about this here.

Here an example:

model PostInCategories {
  category Category @map(name: "category_id")
  post     Post     @map(name: "post_id")

  @@unique([post, category], name: "post_id_category_id_unique")
  @@map(name: "post_in_categories")
}
Related