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

camelCase wont support upper case schemas #113

Open
hugofdsantos opened this issue Oct 30, 2024 · 0 comments
Open

camelCase wont support upper case schemas #113

hugofdsantos opened this issue Oct 30, 2024 · 0 comments

Comments

@hugofdsantos
Copy link

When using camelCase = true in schema.prisma with upper case column names, the result is upper cased strings without "_".

Example:

model Customer {
  id         Int      @id(map: "PK_TEST_CUSTOMERS") @default(autoincrement()) @map("ID")
  updatedAt  DateTime @updatedAt @map("UPDATED_AT") @db.DateTime

  @@map("TEST_CUSTOMERS")
}

The above schema would generate this types:

export type Customer = {
    ID: Generated<number>;
    UPDATEDAT: Timestamp;
};

export type DB = {
    TESTCUSTOMERS: Customer;
}

Is it possible to generate camelCase table/column names with this example?

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

1 participant