X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=db.sql;h=eb7c461bcc426ec0bee8c4ab96db564cee1c128d;hb=3f852ae0fbb42655a1baf66d914007f02fd4720e;hp=427c1ef4d586a3c6e26ca8871749e573a7732684;hpb=5324bc7cd7e6d6f654bb5b763bad7a13840004a3;p=zpackage 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 ;