3 PRAGMA application_id = 0x5a504442;
4 PRAGMA user_version = 1;
6 -- should be faster with rowid due to the blob content
15 create table packages (
17 version text, -- the upstream version string
18 release integer, -- the local release number
22 licenses text, -- hash of actual license? need table for more than one?
24 build_time integer default (strftime('%s', 'now')),
26 primary key (package,version,release)
31 create table packagefiles (
36 mode text, -- perms, use text for octal rep?
37 username text, -- name of owner
38 groupname text, -- group of owner
39 --filetype integer default 0, -- 0 regular file, 1 directory, 2 symlink
40 -- regular file if null target and not null hash
41 -- except that we could not know the hash, or care
42 -- directory if null hash and null target
43 -- symlink if null hash and not null target
44 -- hard link if not null hash and not null target
45 -- device special files add dev number column
46 -- fifos add mode? Can encode filetype in mode.
47 target text, -- link target
48 hash text, -- what should go here, null for dir?
49 mtime integer, -- seconds since epoch, but allow finer?
50 primary key (package,version,release,path),
51 foreign key (package,version,release) references packages (package,version,release) on delete cascade
56 -- TODO just elf information?
57 -- and just hash, not package?
58 create table libraries (
66 create table librarydeps (
70 soname text -- soname of dependency
73 -- package scripts: table of package, stage, file
74 create table scripts (
81 -- package dependencies: table of package, dependency, dep type (package, soname)
82 create table packagedeps (
85 requires text, -- package name
86 subreq text, -- if requires only a sub package, probably most common for libs
92 create table provides (
95 label text -- a capability label
98 create table requires (
101 label text -- a capability label
104 create table packagegroups (