hello, I upgraded prisma client from version 3.14 ...
# prisma-client
r
hello, I upgraded prisma client from version 3.14 to version 4.0.0 (latest)
Copy code
PrismaClientKnownRequestError:
[0] Invalid `prisma.product.findMany()` invocation in
[0] /app/server/data/index.js:148:37
[0]
[0]   145 }
[0]   146
[0]   147 const getTopProducts = async () => {
[0] → 148   const result = await prisma.product.findMany(
[0]   Inconsistent column data: Conversion failed: Value 2847246203 does not fit in an INT column, try migrating the 'revenue' column type to BIGINT
[0]     at RequestHandler.handleRequestError (/server/node_modules/@prisma/client/runtime/index.js:49670:13)
[0]     at RequestHandler.request (/server/node_modules/@prisma/client/runtime/index.js:49652:12)
[0]     at async PrismaClient._request (/server/node_modules/@prisma/client/runtime/index.js:50572:18)
[0]     at async getTopProducts (/server/data/index.js:148:18)
[0]     at async /server/routes/index.js:142:12 {
[0]   code: 'P2023',
[0]   clientVersion: '4.0.0',
[0]   meta: {
[0]     message: "Conversion failed: Value 2847246203 does not fit in an INT column, try migrating the 'revenue' column type to BIGINT"
[0]   }
[0] }
always used the Prisma SQLite connector, didn't have this problem before upgrading to version 4.0.0 here is the model
Copy code
datasource db {
  provider = "sqlite"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
  previewFeatures = []
}

model Product {
...
revenue				Int
...
}
1
n
Hey Ridhwaan 👋 You are running into this error: https://www.prisma.io/docs/concepts/database-connectors/sqlite#rounding-errors-on-big-numbers From version 4.0.0 you would need to convert your revenue column into BigInt.
Copy code
model Product {
...
revenue				BigInt
...
}