Hey all, running into a strange issue hoping to ge...
# orm-help
b
Hey all, running into a strange issue hoping to get a hand. Here is my schema.prisma model:
Copy code
model PairReading {
  pair         String   @db.VarChar
  time         DateTime @db.Timestamptz(6)
  reading0     Decimal  @db.Decimal
  reading1     Decimal  @db.Decimal
}
However, when I try to insert something like:
Copy code
{
        pair: '1542-AC',
        time: 2022-07-20T00:00:00.000Z,
        reading0: 999999961227775700000,
        reading1: 0.000007021900962402
}
I get the following error:
Copy code
code: 'P2033',
    clientVersion: '4.1.0',
    meta: {
      details: "Query parsing failure: A number used in the query does not fit into a 64 bit signed integer. Consider using `BigInt` as field type if you're trying to store large integers."
    }
I am using Postgres, in my DB the reading0 and reading1 are numeric types and if I manually create a record with those values in that object above it inserts into the DB without any issues so the issue is coming from Prisma side. If I use other values with smaller numbers for readings, prisma doesnt throw anything and it inserts fine but for larger amounts like above it fails
1
a
Hey Brayden! I, too, was able to recreate this error, even if I modified my Prisma schema to use the
BigInt
type, as the error suggests. I would recommend filing a bug report with all the relevant details. Our engineers will help out from there 👍.