How to delete with cascade?
I'm using postgres with the following schema (reduced to the important parts):
And I'm trying to implement an api call to delete a
I believe what I want to use is a CASCADE delete where everything referencing a world is deleted when I delete a world. Is this possible through Drizzle? I can't seem to find anything on this.
And I'm trying to implement an api call to delete a
world. Due to the reference to the world in the users_to_worlds I get the error:Error: update or delete on table "worlds" violates foreign key constraint "users_to_worlds_world_id_worlds_id_fk" on table "users_to_worlds"I believe what I want to use is a CASCADE delete where everything referencing a world is deleted when I delete a world. Is this possible through Drizzle? I can't seem to find anything on this.