From 6674f61905d98aee08b95c22181aa439bfb041e5 Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Thu, 10 Mar 2005 23:51:40 +0000 Subject: Bug 98123 : Create a user preferences infrastructure (became 'General Settings') Patch by Shane H. W. Travis r=jouni, mkanat a=myk --- Bugzilla/DB/Schema.pm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'Bugzilla/DB') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 3a15a755e..99f5f106f 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -913,6 +913,55 @@ use constant ABSTRACT_SCHEMA => { ], }, + # SETTINGS + # -------- + # setting - each global setting will have exactly one entry + # in this table. + # setting_value - stores the list of acceptable values for each + # setting, and a sort index that controls the order + # in which the values are displayed. + # profile_setting - If a user has chosen to use a value other than the + # global default for a given setting, it will be + # stored in this table. Note: even if a setting is + # later changed so is_enabled = false, the stored + # value will remain in case it is ever enabled again. + # + setting => { + FIELDS => [ + name => {TYPE => 'varchar(32)', NOTNULL => 1, + PRIMARYKEY => 1}, + default_value => {TYPE => 'varchar(32)', NOTNULL => 1}, + is_enabled => {TYPE => 'BOOLEAN', NOTNULL => 1, + DEFAULT => 'TRUE'}, + ], + }, + + setting_value => { + FIELDS => [ + name => {TYPE => 'varchar(32)', NOTNULL => 1}, + value => {TYPE => 'varchar(32)', NOTNULL => 1}, + sortindex => {TYPE => 'INT2', NOTNULL => 1}, + ], + INDEXES => [ + setting_value_nv_unique_idx => {FIELDS => [qw(name value)], + TYPE => 'UNIQUE'}, + setting_value_ns_unique_idx => {FIELDS => [qw(name sortindex)], + TYPE => 'UNIQUE'}, + ], + }, + + profile_setting => { + FIELDS => [ + user_id => {TYPE => 'INT3', NOTNULL => 1}, + setting_name => {TYPE => 'varchar(32)', NOTNULL => 1}, + setting_value => {TYPE => 'varchar(32)', NOTNULL => 1}, + ], + INDEXES => [ + profile_setting_value_unique_idx => {FIELDS => [qw(user_id setting_name)], + TYPE => 'UNIQUE'}, + ], + }, + }; #-------------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b