summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-02-22 12:32:57 +0100
committerYorhel <git@yorhel.nl>2009-02-22 12:32:57 +0100
commit8e8bf25368ce0e8371e3aa45ce75c560819ed92b (patch)
tree815bd858bd7288d4c56a658b541e97c9f7784e8a /util/updates
parentc8e759f0ea8b54a21822481458ddb00a3373bc08 (diff)
Very basic, unfinished and non-working interface for VN/tag linking
But it already starts to look like something that might work.
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_2.3.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/updates/update_2.3.sql b/util/updates/update_2.3.sql
index 9ae226df..ce8ce966 100644
--- a/util/updates/update_2.3.sql
+++ b/util/updates/update_2.3.sql
@@ -33,8 +33,8 @@ CREATE TABLE tags_vn (
tag integer NOT NULL REFERENCES tags (id) DEFERRABLE INITIALLY DEFERRED,
vid integer NOT NULL REFERENCES vn (id) DEFERRABLE INITIALLY DEFERRED,
uid integer NOT NULL REFERENCES users (id) DEFERRABLE INITIALLY DEFERRED,
- vote smallint NOT NULL DEFAULT 3, -- -3..3 (0 isn't actually used...)
- spoiler boolean NOT NULL DEFAULT FALSE,
+ vote smallint NOT NULL DEFAULT 3 CHECK (vote >= -3 AND vote <= 3 AND vote <> 0),
+ spoiler smallint CHECK(spoiler >= 0 AND spoiler <= 2),
PRIMARY KEY(tag, vid, uid)
) WITHOUT OIDS;