[aur-dev] [PATCH] Fix database schema
Replace "ON SET NULL" with "ON DELETE SET NULL". Fixes a regression introduced in commit fb7bde3 (Add support for anonymous comments, 2014-02-04). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- schema/aur-schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql index 86f7563..932c1d3 100644 --- a/schema/aur-schema.sql +++ b/schema/aur-schema.sql @@ -167,7 +167,7 @@ CREATE TABLE PackageComments ( PRIMARY KEY (ID), INDEX (UsersID), INDEX (PackageID), - FOREIGN KEY (UsersID) REFERENCES Users(ID) ON SET NULL, + FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE SET NULL, FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE, FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE ) ENGINE = InnoDB; -- 1.9.1
participants (1)
-
Lukas Fleischer