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,
-- 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