Hocus
DTDrizzle Team
•Created by Hocus on 12/9/2023 in #help
`{ onDelete: "cascade" }` when the entity is in one-to-one relationship with multiple entities?
hey guys,
whats the best way to use
{ onDelete: "cascade" }
when the entity is in one-to-one relationship with multiple entities?
I have a users
, friendRequests
and locations
.
users
, friendRequests
both have a location
, and if a user
or friendRequests
gets deleted, I want to delete the corresponding location
as well.
26 replies
DTDrizzle Team
•Created by Hocus on 12/5/2023 in #help
Updated drizzle-kit -> Error: Cannot find module 'drizzle-orm/pg-core'
I updated drizzle from:
to
I updated my config to use the new
defineConfig
method and changed the connectionString
to uri
but now I am getting this error when I try to run drizzle-kit:
Error: Cannot find module 'drizzle-orm/pg-core'
I dont use postgres, my driver is mysql2
using PlanetScale as DB provider.
my package.json - I am using bun run
incase it matters:
7 replies
DTDrizzle Team
•Created by Hocus on 12/4/2023 in #help
Prepare statement throws type error for enums. How to get type safety for prepared values
10 replies