mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Support comment editing in the backend
Create two new actions, do_AddComment and do_EditComment. When editing or deleting a comment, a timestamp is added. Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
92e19e95f3
commit
e331ce273c
5 changed files with 73 additions and 1 deletions
|
@ -254,11 +254,14 @@ CREATE TABLE PackageComments (
|
|||
UsersID INTEGER UNSIGNED NULL DEFAULT NULL,
|
||||
Comments TEXT NOT NULL DEFAULT '',
|
||||
CommentTS BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
EditedTS BIGINT UNSIGNED NULL DEFAULT NULL,
|
||||
EditedUsersID INTEGER UNSIGNED NULL DEFAULT NULL,
|
||||
DelUsersID INTEGER UNSIGNED NULL DEFAULT NULL,
|
||||
PRIMARY KEY (ID),
|
||||
INDEX (UsersID),
|
||||
INDEX (PackageBaseID),
|
||||
FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE SET NULL,
|
||||
FOREIGN KEY (EditedUsersID) REFERENCES Users(ID) ON DELETE SET NULL,
|
||||
FOREIGN KEY (DelUsersID) REFERENCES Users(ID) ON DELETE CASCADE,
|
||||
FOREIGN KEY (PackageBaseID) REFERENCES PackageBases(ID) ON DELETE CASCADE
|
||||
) ENGINE = InnoDB;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue