X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=db.sql;h=a9e2a5e0e10f4626003c227709b93658b5a29ad2;hb=34c41d71027a3e94c1f613baeea2e74e038e0108;hp=8ed6537e56b1c635f4587f0d224a7aab59f9d722;hpb=23ba9842e1beaf9cd09d306747b2d7b28a5c2b14;p=zpackage diff --git a/db.sql b/db.sql index 8ed6537..a9e2a5e 100644 --- a/db.sql +++ b/db.sql @@ -264,30 +264,20 @@ create table pathtags ( without rowid ; -create table elfinfo ( - file text primary key, -- hash of blob - elftype text, - foreign key (file) references files on delete cascade -) -without rowid -; - -create table elfdeps ( - file text, - soname text, - dependency text, - primary key (file, soname, dependency), - foreign key (file) references files on delete cascade -) -without rowid +create view elfdeps as +select PF.pkgid, PF.status, PF.path, N.needed as needs, +PL.path as library, PL.pkgid provider, PL.status as library_status +from packagefiles_status PF +join elfneeded N on N.file = PF.hash +left join elflibraries L on N.needed = L.soname +left join packagefiles_status PL on PL.hash = L.file ; -- TODO just elf information? -- and just hash, not package? create table elflibraries ( file text primary key, - soname text, - foreign key (file) references files on delete cascade + soname text ) without rowid ; @@ -295,8 +285,7 @@ without rowid create table elfneeded ( file text, needed text, -- soname of dependency - primary key (file, needed), - foreign key (file) references files on delete cascade + primary key (file, needed) ) without rowid ;