Handling Out Of Range Numbers (MySQL) #12750
-
|
I'm a fairly inexperienced programmer building a REST API with MariaDB and Prisma for a small community project. I realized today that with the default settings in my database numbers that are too large are simply truncated instead of rejected. This isn't the behaviour I want, but I'm unsure of the best way to fix it. Some googling pointed me to enabling STRICT_ALL_TABLES, but apparently that can lead to partial updates. Is STRICT_ALL_TABLES the way to go here? Does Prisma enforce atomicity even if this is active? Or would I be forced to use the transactions API to be sure of atomicity? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Hey @otobot1 👋, How large are the numbers in your database? You might take a look at using the |
Beta Was this translation helpful? Give feedback.
-
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
Beta Was this translation helpful? Give feedback.
Hey @otobot1 👋,
How large are the numbers in your database? You might take a look at using the
BigInttype instead ofInt.