How do I create a scalar type Numeral(30,2) on Postgres via Prisma datamodel? Default Prisma Float type is Numeral(65,30). I changed a field type manually on Postgress to (30,2). Prisma couldn’t connect to the db after that.
b
bkstorm
05/09/2019, 4:31 AM
Can you show the error log?
n
Noah
05/09/2019, 3:38 PM
The error log says I have no CONNECT permission. Now I reproduced the error. It’s not due to the Numeral but the Timestamp. I changed the type to Timestampwithtimezone from the default Timestampwithouttimezone. Then prisma deploy cannot connect to the db. When I switched the type back to the original Timestampwithouttimezone, prisma deploy started working again
Frankly I found Prisma to be a very frustrating experience. The slightest tweak breaks things. Way too many moving parts. The 1001 separate schemas and maintaining them drives me nuts. Currently I’m looking into Apollo Server to see if it’s any better.
I’ve learnt other technologies from scratch as well but Prisma has been the most frustrating of all.
I respect those who successfully manage to use Prisma in production for apps of a certain sophistication level. (I’m guessing they exist)
Thanks for pointing out. It really beats me why the default type is without time zone to begin with. At least it doesn’t crash when changing the precision of Decimal type.