Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Prisma-Schema-Tool(snakeCase to camelCase)New to Visual Studio Code? Get it now.
Prisma-Schema-Tool(snakeCase to camelCase)

Prisma-Schema-Tool(snakeCase to camelCase)

Samson Amaugo

|
11,593 installs
| (1) | Free
This extension was designed to convert snake-case models or fields in your prisma schema to camael-case
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Prisma-Schema-Tool README

This is a tool designed to convert models and fields in your prisma schema that are in snakeCase to camelCase using the prisma schema map attribute

Reason

There might be situations where the columns in your SQL table are written using snake-case. eg user_id

But you might want to use the prisma api to interact with the field using snake case

Example using:-

prisma.findOne({
    where:{
        userId:${something}
    }
})

Instead of

prisma.findOne({
    where:{
        user_id:${something}
    }
})

Or

`model country {
  id           String    @id
  alpha2_code  String    @unique
  alpha3_code  String    @unique
  name         String    @unique
  demonym      String?
  continent_id String
  continent    continent @relation(fields: [continent_id], references: [id])
}`

//convert the code above to the one below

`model country {
  id           String    @id
  alpha2Code   String    @unique @map("alpha2_code")
  alpha3Code   String    @unique @map("alpha3_code")
  name         String    @unique
  demonym      String?
  continentId  String   @map("continent_id")
  continent    Continent @relation(fields: [continentId], references: [id])
}
`

How to use

  • Right click on the prisma file which must end with the .prisma extension
  • select Prisma Schema Convert menu option
  • The file should be converted by now

You can check out my blog swacblooms for details on this extension

Contact

  • sammychinedu2ky@gmail.com
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft