summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2014-03-08 12:39:32 +0100
committerHelmut Grohne <helmut@subdivi.de>2014-03-08 12:39:32 +0100
commitc6a30cefff55cd247a47fa0a2d4f819592e1202b (patch)
tree58b6ff52bc6827782c2973f1ce976e245ce5f34c /schema.sql
parent751f19ec1107c9059ae4834e4b757741ebee6cbd (diff)
parentbb0aea9971bc79d8787d8f034022d0ca803fcab3 (diff)
downloaddebian-dedup-c6a30cefff55cd247a47fa0a2d4f819592e1202b.tar.gz
Merge branch 'master' into sqlalchemy
In the mean time, the master branch evolved quite a bit and the schema changed again (eqclass added to function table). The main reason for the merge is to resolve the large amounts of conflicts once, so development of the sqlalchemy branch can continue and still benefit from changes in the master branch such as schema compatibility, adapting the indent level in web app due to the use of contextlib.closing which resembles sqlalchemy's "with db.begin() as conn:". Conflicts: autoimport.py dedup/utils.py readyaml.py update_sharing.py webapp.py
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/schema.sql b/schema.sql
index ddc6ccd..f6b1a7c 100644
--- a/schema.sql
+++ b/schema.sql
@@ -1,7 +1,7 @@
CREATE TABLE package (id INTEGER PRIMARY KEY, name TEXT UNIQUE, version TEXT, architecture TEXT, source TEXT);
CREATE TABLE content (id INTEGER PRIMARY KEY, pid INTEGER, filename TEXT, size INTEGER, FOREIGN KEY (pid) REFERENCES package(id) ON DELETE CASCADE);
-CREATE TABLE function (id INTEGER PRIMARY KEY, name TEXT UNIQUE NOT NULL);
-INSERT INTO function (name) VALUES ("sha512"), ("gzip_sha512"), ("png_sha512"), ("gif_sha512");
+CREATE TABLE function (id INTEGER PRIMARY KEY, name TEXT UNIQUE NOT NULL, eqclass INTEGER);
+INSERT INTO function (id, name, eqclass) VALUES (1, 'sha512', 1), (2, 'gzip_sha512', 1), (3, 'png_sha512', 2), (4, 'gif_sha512', 2);
CREATE TABLE hash (cid INTEGER, fid INTEGER NOT NULL, hash TEXT, FOREIGN KEY (cid) REFERENCES content(id) ON DELETE CASCADE, FOREIGN KEY (fid) REFERENCES function(id));
CREATE TABLE dependency (pid INTEGER, required TEXT, FOREIGN KEY (pid) REFERENCES package(id) ON DELETE CASCADE);
CREATE INDEX content_package_size_index ON content (pid, size);