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

[BUG]: Sqlite tables with columns named "length" break Drizzle Studio #4048

Open
1 task done
sadkebab opened this issue Jan 31, 2025 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@sadkebab
Copy link

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

0.39.1

What version of drizzle-kit are you using?

0.30.4

Other packages

No response

Describe the Bug

Undesired Behaviour

If you have a sqlite table with a column named "length", the column will be skipped by Drizzle Studio shifting the column values to the previews column and leaving the last column with "undefined" values.

For example, if you have a table named "test" with comuns "id","text","length","createdAt"
The table contains two rows with the values:

1,"lorem ipsum"   , 10, "1738321976775"
2,"dolor sit amet", 20, "1738321977775"

If you open the table on drizzle studio what you will see is

1,"lorem ipsum"   , "1738321976775",undefined
2,"dolor sit amet", "1738321977775",undefined

Screenshots

As you can see from the following screenshots, the table has 8 fields, but the data loading request returns tuples of 7 values.

Table

Table

Network tab

Loader

Reproduction

I created a public repo for reproduction with instruction in the README.
I tested MySql and PG too and this seems to be affecting only SQLite.

Reproduction Repository

@sadkebab sadkebab added the bug Something isn't working label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant