summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-12-23 12:05:57 +0100
committerYorhel <git@yorhel.nl>2010-12-23 12:05:57 +0100
commit951568c87b1a1ad6fcb73928608f76b3470fd817 (patch)
tree9c01cc5a5fd66c894ab76ae7f005668d3f1c256e /util
parente0131b6ab501eaeda1003ac5131f803a36192d46 (diff)
Converted the show_nsfw preference to use the users_prefs table
Diffstat (limited to 'util')
-rw-r--r--util/sql/schema.sql1
-rw-r--r--util/updates/update_2.16.sql3
2 files changed, 3 insertions, 1 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index 02fb7d60..8826a01e 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -266,7 +266,6 @@ CREATE TABLE users (
rank smallint NOT NULL DEFAULT 3,
passwd bytea NOT NULL DEFAULT '',
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,
c_changes integer NOT NULL DEFAULT 0,
diff --git a/util/updates/update_2.16.sql b/util/updates/update_2.16.sql
index 86654c72..a0678fd3 100644
--- a/util/updates/update_2.16.sql
+++ b/util/updates/update_2.16.sql
@@ -63,7 +63,10 @@ INSERT INTO users_prefs (uid, key, value)
SELECT id, 'skin'::prefs_key, skin FROM users WHERE skin <> ''
UNION
SELECT id, 'customcss', customcss FROM users WHERE customcss <> '';
+ UNION
+ SELECT id, 'show_nsfw'::prefs_key, '1' FROM users WHERE show_nsfw;
ALTER TABLE users DROP COLUMN skin;
ALTER TABLE users DROP COLUMN customcss;
+ALTER TABLE users DROP COLUMN show_nsfw;