summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-03 22:57:07 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 12:20:32 +0200
commit856298755246b3841f102b67ac123bca0f12a7fd (patch)
tree6da2a6ae00fb804172ec8f35acb447169546fb2f
parent2cdaa4c2c3d4eedd3eec6a432c36dae101bcb898 (diff)
downloadaur-856298755246b3841f102b67ac123bca0f12a7fd.tar.gz
aur-856298755246b3841f102b67ac123bca0f12a7fd.tar.xz
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>
-rw-r--r--schema/aur-schema.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql
index 86f75633..932c1d38 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;