From 951568c87b1a1ad6fcb73928608f76b3470fd817 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Thu, 23 Dec 2010 12:05:57 +0100 Subject: Converted the show_nsfw preference to use the users_prefs table --- util/sql/schema.sql | 1 - util/updates/update_2.16.sql | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'util') 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; -- cgit v1.2.3