Brayden Abick
08/19/2022, 7:42 PMmodel 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:
{
pair: '1542-AC',
time: 2022-07-20T00:00:00.000Z,
reading0: 999999961227775700000,
reading1: 0.000007021900962402
}
I get the following error:
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 failsAustin
08/19/2022, 9:39 PMBigInt
type, as the error suggests.
I would recommend filing a bug report with all the relevant details. Our engineers will help out from there 👍.