1 year ago

Multi relation foreign keys

Posted 1 year ago by SkyCoder

If I have 3 tables:

User, Conversation, Messages

Between User and conversation I have:


And between conversation and messages:


If someone accidentally try to delete conversation, it should stop him because of messages restriction. But same way user is deleted I want to delete both conversation and messages.

How can I accomplish that?

Please sign in or create an account to participate in this conversation.