From f9eba12312fc6a1758f7f1051a8f30b435175f94 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 1 Mar 2011 10:21:06 -0600 Subject: Ensure users can be deleted when foreign keys are present This change is necessary to prevent this: mysql> delete from Users where ID = 112; ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`aur`.`Packages`, CONSTRAINT `Packages_ibfk_2` FOREIGN KEY (`SubmitterUID`) REFERENCES `Users` (`ID`) ON DELETE NO ACTION) As a bonus, due to foreign keys, orphaning of packages will be automatic. Signed-off-by: Dan McGee Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc | 1 - 1 file changed, 1 deletion(-) (limited to 'web') diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc index a4de12c..5dfe50e 100644 --- a/web/lib/acctfuncs.inc +++ b/web/lib/acctfuncs.inc @@ -801,7 +801,6 @@ function user_suspended( $id ) /* * This should be expanded to return something - * TODO: Handle orphaning of user's packages */ function user_delete( $id ) { -- cgit v1.2.3-70-g09d2