summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
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 ed5315c6..3bc27c77 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();