summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-02-04 18:39:49 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-02-04 18:48:23 +0100
commitfb7bde3a6ca049700a691324c21005ae26782584 (patch)
tree2844c5ea2d7c7364349938ba6e42059fd92f6b48 /support
parent6ee13212111ab67f920ff7778e39acd69a9878df (diff)
downloadaur-fb7bde3a6ca049700a691324c21005ae26782584.tar.gz
aur-fb7bde3a6ca049700a691324c21005ae26782584.tar.xz
Add support for anonymous comments
This allows for removing users without also removing the corresponding comments. Instead, all comments from deleted users will be displayed as "Anonymous comment". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'support')
-rw-r--r--support/schema/aur-schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql
index 25e828ea..c01701c8 100644
--- a/support/schema/aur-schema.sql
+++ b/support/schema/aur-schema.sql
@@ -161,14 +161,14 @@ CREATE UNIQUE INDEX VoteUsersIDPackageID ON PackageVotes (UsersID, PackageID);
CREATE TABLE PackageComments (
ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
PackageID INTEGER UNSIGNED NOT NULL,
- UsersID INTEGER UNSIGNED NOT NULL,
+ UsersID INTEGER UNSIGNED NULL DEFAULT NULL,
Comments TEXT NOT NULL DEFAULT '',
CommentTS BIGINT UNSIGNED NOT NULL DEFAULT 0,
DelUsersID INTEGER UNSIGNED NULL DEFAULT NULL,
PRIMARY KEY (ID),
INDEX (UsersID),
INDEX (PackageID),
- FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
+ FOREIGN KEY (UsersID) REFERENCES Users(ID) ON SET NULL,
FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE,
FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE
) ENGINE = InnoDB;