From 856298755246b3841f102b67ac123bca0f12a7fd Mon Sep 17 00:00:00 2001
From: Lukas Fleischer <archlinux@cryptocrack.de>
Date: Thu, 3 Apr 2014 22:57:07 +0200
Subject: 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(-)

(limited to 'schema/aur-schema.sql')

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;
-- 
cgit v1.3.1

