Does anyone know how I can configure certain model...
# orm-help
s
Does anyone know how I can configure certain model fields to be certain types with prisma introspect? I have a MySQL TINYINT(1) being converted to a Boolean when I need it as an Int.
r
@Stephen 👋 Unfortunately that is a current default we have that is not configurable in any way.
A workaround would be using
tinyint
without specifying the
1
and that would work fine.
s
Thanks for the response Ryan
I'm assuming it'll always map a TinyInt(1) to Boolean ?
Do you know if there is documentation of what the mapping rules are?
r
Yes it will always map it to Boolean. Here are the type mappings for MySQL: https://www.prisma.io/docs/concepts/database-connectors/mysql#native-type-mappings