I can't find how to add ON DELETE CASCADE
rule in pgAdmin 3. I want to achieve that if a record in the parent table is deleted, then the corresponding records in the child table will automatically be deleted.
Still, I can't find this option when creating tables visually in pgAdmin.
I can see something like this:
But none of this seems to offers option to achieve what I want... Any ideas how to do it through pgAdmin?
Oh, I just found it, it was simple, but still I will post it for future readers with a same question. When creating foreign key constraint there is Action tab and from there it is possible to define what you want to happen on update, or on delete:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With