Cayter
Explore posts from serversDTDrizzle Team
•Created by Cayter on 5/25/2023 in #help
Migrating from Prisma gradually
We're in the middle of migrating away from Prisma to Drizzle which we just found out that Drizzle has its own naming convention for
FOREIGN KEY CONSTRAINT
.
To avoid surprises for this migration, we'd like to keep Prisma constraint names, I looked into the reference()
type definitions, it seems that we don't have a way to customise the FOREIGN KEY CONSTRAINT
name, is that correct?
At the same time, the current generated constraint name is longer than Postgres's allowed length. How can we workaround this?15 replies
DTDrizzle Team
•Created by Cayter on 5/24/2023 in #help
How to transform to camelCase with json_agg()?
As topic. I can't find any example on how to go about this. The closest I can find is https://orm.drizzle.team/docs/sql#sqlmapwith, but this feels counter-productive as we will have to do it every time we need it. Is there a better way?
1 replies
DTDrizzle Team
•Created by Cayter on 5/23/2023 in #help
How to use select?
I have a SQL query
I am trying to translate the select but couldn't get it to work, any idea what's wrong?
1 replies