summaryrefslogtreecommitdiff
path: root/pkgbase_schema.sql
diff options
context:
space:
mode:
authormartin.von.loewis <devnull@localhost>2010-07-24 10:58:20 +0000
committermartin.von.loewis <devnull@localhost>2010-07-24 10:58:20 +0000
commit7707c2a159471842004532245051a85b41bbd501 (patch)
treefb602d299a5b54ae85340db19e133fd99b5c70cc /pkgbase_schema.sql
parentf1dc4b0a9cba691cf43814fc5223d0ff0c5ee475 (diff)
downloaddecorator-7707c2a159471842004532245051a85b41bbd501.tar.gz
Follow pkgbase change to change ratings primary
key. Restore unique constraint.
Diffstat (limited to 'pkgbase_schema.sql')
-rw-r--r--pkgbase_schema.sql1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgbase_schema.sql b/pkgbase_schema.sql
index 909217e..d3e728e 100644
--- a/pkgbase_schema.sql
+++ b/pkgbase_schema.sql
@@ -331,6 +331,7 @@ CREATE TABLE ratings(
user_name TEXT REFERENCES users ON DELETE CASCADE,
date TIMESTAMP,
rating INTEGER,
+ UNIQUE(name,version,user_name),
FOREIGN KEY (name, version) REFERENCES releases ON UPDATE CASCADE ON DELETE CASCADE
);
CREATE INDEX rating_name_version ON ratings(name, version);