diff options
-rw-r--r-- | support/schema/aur-schema.sql | 5 | ||||
-rw-r--r-- | web/lib/acctfuncs.inc | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql index 44501b6b..8226b182 100644 --- a/support/schema/aur-schema.sql +++ b/support/schema/aur-schema.sql @@ -114,8 +114,9 @@ CREATE TABLE Packages ( INDEX (SubmitterUID), INDEX (MaintainerUID), FOREIGN KEY (CategoryID) REFERENCES PackageCategories(ID) ON DELETE NO ACTION, - FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE NO ACTION, - FOREIGN KEY (MaintainerUID) REFERENCES Users(ID) ON DELETE NO ACTION + -- deleting a user will cause packages to be orphaned, not deleted + FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE SET NULL, + FOREIGN KEY (MaintainerUID) REFERENCES Users(ID) ON DELETE SET NULL ) ENGINE = InnoDB; diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc index a4de12c6..5dfe50e4 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 ) { |