summaryrefslogtreecommitdiffstats
path: root/schema
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-08-30 16:24:13 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-08-30 16:44:12 +0200
commite1a258bd832c3ba76b5f898cbd068c5bdf4eb4dc (patch)
treef24bf8f305d6493b23ad654ea0534ad4b851be9b /schema
parent57250a164172672f26c763e8453855f74d72c191 (diff)
downloadaurweb-e1a258bd832c3ba76b5f898cbd068c5bdf4eb4dc.tar.xz
Remember user ID when flagging package bases
Add a new FlaggerUID field to the database and use it to store the user ID of the account who recently flagged a package out-of-date. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'schema')
-rw-r--r--schema/aur-schema.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/schema/aur-schema.sql b/schema/aur-schema.sql
index 444cb5e..9556b20 100644
--- a/schema/aur-schema.sql
+++ b/schema/aur-schema.sql
@@ -84,6 +84,7 @@ CREATE TABLE PackageBases (
OutOfDateTS BIGINT UNSIGNED NULL DEFAULT NULL,
SubmittedTS BIGINT UNSIGNED NOT NULL,
ModifiedTS BIGINT UNSIGNED NOT NULL,
+ FlaggerUID BIGINT UNSIGNED NULL DEFAULT NULL, -- who flagged the package out-of-date?
SubmitterUID INTEGER UNSIGNED NULL DEFAULT NULL, -- who submitted it?
MaintainerUID INTEGER UNSIGNED NULL DEFAULT NULL, -- User
PackagerUID INTEGER UNSIGNED NULL DEFAULT NULL, -- Last packager
@@ -93,6 +94,7 @@ CREATE TABLE PackageBases (
INDEX (SubmitterUID),
INDEX (MaintainerUID),
INDEX (PackagerUID),
+ FOREIGN KEY (FlaggerUID) REFERENCES Users(ID) ON DELETE SET NULL,
-- deleting a user will cause packages to be orphaned, not deleted
FOREIGN KEY (SubmitterUID) REFERENCES Users(ID) ON DELETE SET NULL,
FOREIGN KEY (MaintainerUID) REFERENCES Users(ID) ON DELETE SET NULL,