summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-10 15:55:42 +0100
committerYorhel <git@yorhel.nl>2010-12-10 16:03:09 +0100
commita8c9a132748c77263f7f552b2c6838e5f086307a (patch)
treed6e0bf4153a41d053a9b245899adff8009fbe8ec /util
parent5c949ff5cb57fc56e05dde010cc852f0f1207ca0 (diff)
Keep track of last modification date for tag<->vn links
Currently unused, but this will be useful in the future. dbTagLinkEdit() is now a lot more complex, since the last modification date will be incorrect for unmodified tag links when we simply delete and re-insert all related links like the old function did.
Diffstat (limited to 'util')
-rw-r--r--util/sql/schema.sql1
-rw-r--r--util/updates/update_2.15.sql4
2 files changed, 5 insertions, 0 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index 6911a40b..48367e4c 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -217,6 +217,7 @@ CREATE TABLE tags_vn (
uid integer NOT NULL,
vote smallint NOT NULL DEFAULT 3 CHECK (vote >= -3 AND vote <= 3 AND vote <> 0),
spoiler smallint CHECK(spoiler >= 0 AND spoiler <= 2),
+ date timestamptz NOT NULL DEFAULT NOW(),
PRIMARY KEY(tag, vid, uid)
);
diff --git a/util/updates/update_2.15.sql b/util/updates/update_2.15.sql
new file mode 100644
index 00000000..b35b7636
--- /dev/null
+++ b/util/updates/update_2.15.sql
@@ -0,0 +1,4 @@
+
+
+ALTER TABLE tags_vn ADD COLUMN date timestamptz NOT NULL DEFAULT NOW();
+