Decimal Inferred is a string
Any idea why my decimal is being inferred as a string instead of a number?
![No description](https://cdn.answeroverflow.com/1172572285471838328/vengeance2023-11-10_at_10.22.36.png)
Solution:Jump to solution
This is correct behavior. The problem is that decimal can have a lot more decimals than a JS number. See here for more info https://github.com/drizzle-team/drizzle-orm/issues/1026#issuecomment-1694040929
GitHub
[BUG]: MySQL
decimal
is inferred as string · Issue #1026 · drizzl...What version of drizzle-orm are you using? ^0.28.2 What version of drizzle-kit are you using? No response Describe the Bug const table = mysqlTable('table', { column: decimal('column...
2 Replies
Solution
This is correct behavior. The problem is that decimal can have a lot more decimals than a JS number. See here for more info https://github.com/drizzle-team/drizzle-orm/issues/1026#issuecomment-1694040929
GitHub
[BUG]: MySQL
decimal
is inferred as string · Issue #1026 · drizzl...What version of drizzle-orm are you using? ^0.28.2 What version of drizzle-kit are you using? No response Describe the Bug const table = mysqlTable('table', { column: decimal('column...
ah, okay. thank you :D