diff options
author | Yorhel <git@yorhel.nl> | 2019-10-08 16:02:23 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-10-10 16:40:24 +0200 |
commit | 4c1dfc8bb62171c4c21057c47f238c8747bac3f8 (patch) | |
tree | 6d62188bd3081015e19deda67842a1a0e77b7543 /util | |
parent | 22be42adddc028f0332f5635249db97bd098bba6 (diff) |
rewards: Add user settings
They don't do anything yet.
Diffstat (limited to 'util')
-rw-r--r-- | util/sql/perms.sql | 7 | ||||
-rw-r--r-- | util/sql/schema.sql | 11 | ||||
-rw-r--r-- | util/updates/update_20191010.sql | 10 |
3 files changed, 23 insertions, 5 deletions
diff --git a/util/sql/perms.sql b/util/sql/perms.sql index 6bf43a63..5e0f5df3 100644 --- a/util/sql/perms.sql +++ b/util/sql/perms.sql @@ -64,10 +64,9 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON traits_parents TO vndb_site; -- users table is special; The 'perm', 'passwd' and 'mail' columns are -- protected and can only be accessed through the user_* functions. -GRANT SELECT (id, username, registered, perm, c_votes, c_changes, ip, c_tags, ign_votes, email_confirmed, skin, customcss, filter_vn, filter_release, show_nsfw, hide_list, notify_dbedit, notify_announce, vn_list_own, vn_list_wish, tags_all, tags_cont, tags_ero, tags_tech, spoilers, traits_sexual), - INSERT (id, username, mail, registered, c_votes, c_changes, ip, c_tags, ign_votes, email_confirmed, skin, customcss, filter_vn, filter_release, show_nsfw, hide_list, notify_dbedit, notify_announce, vn_list_own, vn_list_wish, tags_all, tags_cont, tags_ero, tags_tech, spoilers, traits_sexual), - UPDATE ( username, registered, c_votes, c_changes, ip, c_tags, ign_votes, email_confirmed, skin, customcss, filter_vn, filter_release, show_nsfw, hide_list, notify_dbedit, notify_announce, vn_list_own, vn_list_wish, tags_all, tags_cont, tags_ero, tags_tech, spoilers, traits_sexual) ON users TO vndb_site; -GRANT DELETE ON users TO vndb_site; +GRANT SELECT (id, username, registered, perm, c_votes, c_changes, ip, c_tags, ign_votes, email_confirmed, skin, customcss, filter_vn, filter_release, show_nsfw, hide_list, notify_dbedit, notify_announce, vn_list_own, vn_list_wish, tags_all, tags_cont, tags_ero, tags_tech, spoilers, traits_sexual, nodistract_can, nodistract_noads, nodistract_nofancy, support_can, support_enabled, uniname_can, uniname, pubskin_can, pubskin_enabled), + INSERT (id, username, mail, registered, c_votes, c_changes, ip, c_tags, ign_votes, email_confirmed, skin, customcss, filter_vn, filter_release, show_nsfw, hide_list, notify_dbedit, notify_announce, vn_list_own, vn_list_wish, tags_all, tags_cont, tags_ero, tags_tech, spoilers, traits_sexual, nodistract_can, nodistract_noads, nodistract_nofancy, support_can, support_enabled, uniname_can, uniname, pubskin_can, pubskin_enabled), + UPDATE ( username, registered, c_votes, c_changes, ip, c_tags, ign_votes, email_confirmed, skin, customcss, filter_vn, filter_release, show_nsfw, hide_list, notify_dbedit, notify_announce, vn_list_own, vn_list_wish, tags_all, tags_cont, tags_ero, tags_tech, spoilers, traits_sexual, nodistract_can, nodistract_noads, nodistract_nofancy, support_can, support_enabled, uniname_can, uniname, pubskin_can, pubskin_enabled) ON users TO vndb_site; GRANT SELECT, INSERT, UPDATE ON vn TO vndb_site; GRANT SELECT, INSERT, DELETE ON vn_anime TO vndb_site; diff --git a/util/sql/schema.sql b/util/sql/schema.sql index 7db233d1..a3c65c7b 100644 --- a/util/sql/schema.sql +++ b/util/sql/schema.sql @@ -734,7 +734,16 @@ CREATE TABLE users ( tags_ero boolean NOT NULL DEFAULT FALSE, tags_tech boolean NOT NULL DEFAULT TRUE, spoilers smallint NOT NULL DEFAULT 0, - traits_sexual boolean NOT NULL DEFAULT FALSE + traits_sexual boolean NOT NULL DEFAULT FALSE, + nodistract_can boolean NOT NULL DEFAULT FALSE, + nodistract_noads boolean NOT NULL DEFAULT FALSE, + nodistract_nofancy boolean NOT NULL DEFAULT FALSE, + support_can boolean NOT NULL DEFAULT FALSE, + support_enabled boolean NOT NULL DEFAULT FALSE, + uniname_can boolean NOT NULL DEFAULT FALSE, + uniname text NOT NULL DEFAULT '', + pubskin_can boolean NOT NULL DEFAULT FALSE, + pubskin_enabled boolean NOT NULL DEFAULT FALSE ); -- vn diff --git a/util/updates/update_20191010.sql b/util/updates/update_20191010.sql new file mode 100644 index 00000000..1cdf898f --- /dev/null +++ b/util/updates/update_20191010.sql @@ -0,0 +1,10 @@ +ALTER TABLE users ADD COLUMN nodistract_can boolean NOT NULL DEFAULT FALSE; +ALTER TABLE users ADD COLUMN nodistract_noads boolean NOT NULL DEFAULT FALSE; +ALTER TABLE users ADD COLUMN nodistract_nofancy boolean NOT NULL DEFAULT FALSE; +ALTER TABLE users ADD COLUMN support_can boolean NOT NULL DEFAULT FALSE; +ALTER TABLE users ADD COLUMN support_enabled boolean NOT NULL DEFAULT FALSE; +ALTER TABLE users ADD COLUMN uniname_can boolean NOT NULL DEFAULT FALSE; +ALTER TABLE users ADD COLUMN uniname text NOT NULL DEFAULT ''; +ALTER TABLE users ADD COLUMN pubskin_can boolean NOT NULL DEFAULT FALSE; +ALTER TABLE users ADD COLUMN pubskin_enabled boolean NOT NULL DEFAULT FALSE; +\i util/sql/perms.sql |