description text,
architecture text,
url text,
+ status text,
licenses text, -- hash of actual license? need table for more than one?
packager text,
build_time integer default (strftime('%s', 'now')),
without rowid
;
+-- handle package status history with a logging trigger.
+create trigger logpkgstatus after update of status on packages
+begin insert into zpmlog (action,target,info)
+ values (printf('status change %s %s', OLD.status, NEW.status),
+ printf('%s-%s-%s', NEW.package, NEW.version, NEW.release),
+ NULL); END;
+
create table packagetags (
-- package id triple
package text,
;
create table elfinfo (
- file text, -- hash of blob
+ 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
+;
-- TODO just elf information?
-- and just hash, not package?
-- sub-invocations, probably an environment variable set if not
-- already set by zpm, probably a uuid or a timestamp
create table zpmlog (
- ts integer, -- timestamp of action, may need sub-second
+ ts text default (strftime('%Y-%m-%d %H:%M:%f', 'now')),
+ -- timestamp of action
action text,
target text, -- packagename, repo name, etc
info text -- human readable