I want to set FK constraint on delete to null but it is not working.
In table transactionauditlogentry I have altered the FK constraints for Packet and Credit table to on delete set null.
If I delete a record from Packet table its working no issues. But if I delete a record from Credit table PSQL gave me error.
insert or update on table "girvi_transactionauditlogentry" violates foreign key constraint "girvi_transactionauditlog_credit_id_78a70d2a_fk_girvi_credit_id"
DETAIL: Key (credit_id)=(1) is not present in table "girvi_credit".
What is wrong??? why its not working??
Parent table: packet, credit
Child table: transactionauditlogentry


