Hello all, I'm following along here <https://www.p...
# orm-help
d
Hello all, I'm following along here https://www.prisma.io/docs/getting-started/setup-prisma/start-from-scratch/relational-databases/querying-the-database-typescript-postgres and encountered an error. When trying to create a new user I get a DB Error response "Integer out of range for type int(4)". I'm just learning this and not sure how to troubleshoot this one. Any help would be much appreciated.
1
Switching to BigInt for the Id field helped but it should work with Int as the tutorial lays out.
Why is it not starting with an Id of 1? It produced "794977141704425474n" as the Id of the first user in the db.
r
Hi @David Wagner 👋 In order to help with this can you please share the schema you initially used before switching to BigInt type for the Id. I also tried out the guide and i was able to create a new user so my best guess is there could be a mismatch between your schema and the one used in the getting started guide.
d
I found the problem. I am using CockroachDB but was using the types for plain postgresql. Silly mistake but it happens. Thanks for your reply though.
r
I'm glad you were able to figure out the issue.