diff options
author | Helmut Grohne <helmut@subdivi.de> | 2016-06-10 07:26:12 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2016-06-10 07:26:12 +0200 |
commit | e123f857a74e2ec8742ceebddebd7d296dcaca3c (patch) | |
tree | e597edbdbfac8eb88cb1ccaf5d5c9d80ada4bb0a /multiarchschema.sql | |
parent | 1853954f5a600a51cea30cdab689d7774045fcb1 (diff) | |
download | debian-dedup-e123f857a74e2ec8742ceebddebd7d296dcaca3c.tar.gz |
add a separate tool for generating hints on Multi-Arch headers
It builds on the core functionality of dedup, but uses a different
database schema. Unlike dedup, it aborts downloading Arch:all packages
early and consumes any other architecture in its entirety instead.
Diffstat (limited to 'multiarchschema.sql')
-rw-r--r-- | multiarchschema.sql | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/multiarchschema.sql b/multiarchschema.sql new file mode 100644 index 0000000..d3dc2eb --- /dev/null +++ b/multiarchschema.sql @@ -0,0 +1,31 @@ +CREATE TABLE package ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL, + version TEXT NOT NULL, + architecture TEXT NOT NULL, + source TEXT NOT NULL, + hasscripts BOOL, + multiarch TEXT + CHECK (multiarch IN ('allowed', 'foreign', 'no', 'same')), + UNIQUE (name, architecture)); + +CREATE TABLE depends ( + id INTEGER PRIMARY KEY, + pid INTEGER NOT NULL REFERENCES package(id) ON DELETE CASCADE, + dependee TEXT NOT NULL, + archqual TEXT); + +CREATE TABLE provides ( + id INTEGER PRIMARY KEY, + pid INTEGER NOT NULL REFERENCES package(id) ON DELETE CASCADE, + provided TEXT NOT NULL); + +CREATE TABLE content ( + id INTEGER PRIMARY KEY, + pid INTEGER NOT NULL REFERENCES package(id) ON DELETE CASCADE, + filename TEXT NOT NULL, + hash TEXT NOT NULL); + +CREATE INDEX depends_pid_index ON depends(pid); +CREATE INDEX provides_pid_index ON provides(pid); +CREATE INDEX content_pid_index ON content(pid); |