How to make all relations be deleted when user is removed?
Hello! I'm trying to get my head around for table relations, and just can't seem to get this figured out. I've table for users, and user sessions. When I'm trying to delete a user, postgres throws error, that delete violates foreign key constraint on sessions.
What might be proper way to define this relations? Below is my schema.
0 Replies