drizzle-team / drizzle-team/drizzle-orm

[BUG]: Column name not being returned as snake_case

Open
#3,094 19 comments 45 reactions 1 assignee Claimed by @L-Mario564 View on GitHub
bug bug/fixed-in-beta has-pr priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.34.1

### What version of `drizzle-kit` are you using?

0.25.0

### Describe the Bug

When using `casing: 'snake_case'` in the config and defining a column like so `firstName: t.text().notNull()`

And then when accessing the column name via `users.firstName.name` we get `firstName` instead of `first_name`

Same happens if we get the columns via `getTableConfig(users).columns` and `getTableColumns(users)`

### Expected behavior

_No response_

### Environment & setup

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.