Hi all,
I recently upgraded from Prisma1 to Prisma2, and I just discovered an issue with Floats. Occasionally, a float I send to my backend will appear in my Postgres database with 12 extra 9s after the number I send it. Strangely, when I call this data from the client, it looks fine.
During introspection, my Prisma1 Floats were mapped to Prisma2 Floats in my Prisma Schema. I’m not sure that was right, because after some digging it seems Prisma2 Floats are now expecting the double type in Postgres. These data columns in my Postgres are numeric(65, 30) since they were created by Prisma1.
I assume my issue involves this mismatch between the Prisma2 generator and my Postgres database. I had no issue with numeric(65, 30). Is there a way to tell my Prisma2 schema that I’m using numeric(65, 30), so it will behave normally? I’d rather not deal with decimal.js or rewrite any existing code. I just want it to behave as before.
Thanks,
Bailey