From 3f852ae0fbb42655a1baf66d914007f02fd4720e Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Sun, 4 Nov 2018 13:53:08 +0000 Subject: [PATCH] add notes.file to filerefs view The hash of a held or preserved config file is put in the file column of a note to store the hash until an admin looks at it. --- db.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db.sql b/db.sql index 427c1ef..eb7c461 100644 --- a/db.sql +++ b/db.sql @@ -16,11 +16,13 @@ CREATE TABLE files ( ; create view filerefs as -select F.hash, count(PF.hash) + count(S.hash) + count(EL.file) as refcount +select F.hash, +count(PF.hash) + count(S.hash) + count(EL.file) + count(N.file) as refcount from files F left join packagefiles PF on PF.hash = F.hash left join scripts S on S.hash = F.hash left join elflibraries EL on EL.file = F.hash +left join notes N on N.file = F.hash group by F.hash ; -- 2.40.0