summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/dump.sql2
-rw-r--r--util/updates/update_2.6.sql6
2 files changed, 7 insertions, 1 deletions
diff --git a/util/dump.sql b/util/dump.sql
index fa29460f..a89a5e7e 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -255,7 +255,7 @@ CREATE TABLE users (
mail varchar(100) NOT NULL,
rank smallint NOT NULL DEFAULT 3,
passwd bytea NOT NULL DEFAULT '',
- registered bigint NOT NULL DEFAULT 0,
+ registered timestamptz NOT NULL DEFAULT NOW(),
show_nsfw boolean NOT NULL DEFAULT FALSE,
show_list boolean NOT NULL DEFAULT TRUE,
c_votes integer NOT NULL DEFAULT 0,
diff --git a/util/updates/update_2.6.sql b/util/updates/update_2.6.sql
index 18e8aee0..7f0242f7 100644
--- a/util/updates/update_2.6.sql
+++ b/util/updates/update_2.6.sql
@@ -76,6 +76,12 @@ ALTER TABLE votes ALTER COLUMN date TYPE timestamptz USING to_timestamp(date);
ALTER TABLE votes ALTER COLUMN date SET DEFAULT NOW();
+-- users.registered -> timestamptz
+ALTER TABLE users ALTER COLUMN registered DROP DEFAULT;
+ALTER TABLE users ALTER COLUMN registered TYPE timestamptz USING to_timestamp(registered);
+ALTER TABLE users ALTER COLUMN registered SET DEFAULT NOW();
+
+
-- screenshots.status (smallint) -> screenshots.processed (boolean)
ALTER TABLE screenshots RENAME COLUMN status TO processed;
ALTER TABLE screenshots ALTER COLUMN processed DROP DEFAULT;