summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-20 13:06:54 +0100
committerYorhel <git@yorhel.nl>2019-12-20 13:06:56 +0100
commitbe4a058f9c78a1b73dd6ac848c5becb62c2199ca (patch)
treed333e9f4a598c9539417cdcd78d9d8619dcc3122 /util
parent52ed55d9ee83b5dfdb3c9fc7d4f607b232c9447b (diff)
Keep track of poll vote dates
That'd make it much easier to find fake accounts.
Diffstat (limited to 'util')
-rw-r--r--util/sql/schema.sql1
-rw-r--r--util/updates/update_20191220.sql2
2 files changed, 3 insertions, 0 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index e644ecc3..aa380aa4 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -645,6 +645,7 @@ CREATE TABLE threads_poll_votes (
tid integer NOT NULL,
uid integer NOT NULL,
optid integer NOT NULL,
+ date timestamptz DEFAULT NOW(),
PRIMARY KEY (tid, uid, optid)
);
diff --git a/util/updates/update_20191220.sql b/util/updates/update_20191220.sql
new file mode 100644
index 00000000..7da67f22
--- /dev/null
+++ b/util/updates/update_20191220.sql
@@ -0,0 +1,2 @@
+ALTER TABLE threads_poll_votes ADD COLUMN date timestamptz;
+ALTER TABLE threads_poll_votes ALTER COLUMN date SET DEFAULT NOW();