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 checksum text, -- checksum of package contents. null for incompleted packages
27 primary key (package,version,release)
32 create table packagefiles (
37 mode text, -- perms, use text for octal rep?
38 username text, -- name of owner
39 groupname text, -- group of owner
40 --filetype integer default 0, -- 0 regular file, 1 directory, 2 symlink
41 -- regular file if null target and not null hash
42 -- except that we could not know the hash, or care
43 -- directory if null hash and null target
44 -- symlink if null hash and not null target
45 -- hard link if not null hash and not null target
46 -- device special files add dev number column
47 -- fifos add mode? Can encode filetype in mode.
48 target text, -- link target
49 hash text, -- what should go here, null for dir?
50 mtime integer, -- seconds since epoch, but allow finer?
51 primary key (package,version,release,path),
52 foreign key (package,version,release) references packages (package,version,release) on delete cascade
57 -- TODO just elf information?
58 -- and just hash, not package?
59 create table libraries (
67 create table librarydeps (
71 soname text -- soname of dependency
74 -- package scripts: table of package, stage, file
75 create table scripts (
82 -- package dependencies: table of package, dependency, dep type (package, soname)
83 create table packagedeps (
86 requires text, -- package name
87 subreq text, -- if requires only a sub package, probably most common for libs
93 create table provides (
96 label text -- a capability label
99 create table requires (
102 label text -- a capability label
105 create table packagegroups (