Nic
Nic
TTCTheo's Typesafe Cult
Created by B00MParry on 10/24/2023 in #questions
Error when pushing twice to planetscale when using T3 stack with drizzle
Their discord says to "create a migration and alter it to remove the drop primary key command". I submitted an issue on their github to raise awareness: https://github.com/drizzle-team/drizzle-orm/issues/1428
4 replies
TTCTheo's Typesafe Cult
Created by B00MParry on 10/24/2023 in #questions
Error when pushing twice to planetscale when using T3 stack with drizzle
Also had this issue, my research comes down to drizzle's introspection isnt pulling the correct keys from the database
4 replies
TTCTheo's Typesafe Cult
Created by Halu on 10/4/2022 in #questions
Why is Prisma the exception to ORM hate?
My 2c coming form a former laravel dev. I for some reason decided to create the database first, then the ORM/schema after. It was just easier that way. That resulted in never using foreign keys, and indexes were a mess. Using prisma, generating the schema first helped me a ton by forcing me to think of the data structure first instead of just winging it. It also set up the foreign keys and indexes a lot more efficiently than I could have done. It also allowed me to be more “nomadic” in my dev environment. Like someone above said migration files are a pain to work with. With prisma you define the schema once, db push and you’re up to date. TLDR: prisma is such a pleasure to work with, and it’s crud functions are simple enough and elegant. My hot take: having a library that forms the raw queries for you instead of you making strings and an execute function makes the code 1000% more reusable. ORMs are useful in that regard. Prisma specifically because if you change the schema, you start getting TS errors if say you change a column from “total_billed” to “totalBilled” in the schema. Building query strings wouldn’t necessarily pick up that change.
17 replies