Answers for "Cannot delete or update a parent row: a foreign key constraint fails (`i2p`.`MembershipApplicationStatus`, CONSTRAINT `MembershipApplicationStatus_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE"

SQL
2

mysql cannot delete or update a parent row

# THIS SHOULD ONLY BE USED AS A LAST RESORT
SET FOREIGN_KEY_CHECKS=0; -- to disable them
SET FOREIGN_KEY_CHECKS=1; -- to re-enable them
Posted by: Guest on January-28-2021

Code answers related to "Cannot delete or update a parent row: a foreign key constraint fails (`i2p`.`MembershipApplicationStatus`, CONSTRAINT `MembershipApplicationStatus_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `User` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE"

Code answers related to "SQL"

Browse Popular Code Answers by Language