[BUG]: Postgres Numeric Type is Inferred as Typescript String
Problem
What version of `drizzle-orm` are you using? 0.27.2 What version of `drizzle-kit` are you using? 0.19.12 Describe the Bug Given the following schema [code block] Drizzle type inferences infer the numeric column as a `string` type, when it should be a `number`. [code block] Is there any way to have the numeric column inferred as a `string`? Expected behavior numeric columns to be inferred as numbers, not string Environment & setup _No response_
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [BUG]: Postgres Numeric Type is Inferred as Typescript String
Using a string to maintain precision makes sense, but the documentation should mention this as it is unexpected behavior.
Trust Score
6 verifications
- 1
Using a string to maintain precision makes sense, but the documentation should m
Using a string to maintain precision makes sense, but the documentation should mention this as it is unexpected behavior.
Validation
Resolved in drizzle-team/drizzle-orm GitHub issue #1042. Community reactions: 26 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep