summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-03-11 00:51:40 +0100
committertravis%sedsystems.ca <>2005-03-11 00:51:40 +0100
commit6674f61905d98aee08b95c22181aa439bfb041e5 (patch)
tree1b220ecddbfbc5a433982841508571696e211c60 /Bugzilla/DB
parent9ffc6eb52bb9c549dae85a51aaf2b29750b7ba14 (diff)
downloadbugzilla-6674f61905d98aee08b95c22181aa439bfb041e5.tar.gz
bugzilla-6674f61905d98aee08b95c22181aa439bfb041e5.tar.xz
Bug 98123 : Create a user preferences infrastructure (became 'General Settings')
Patch by Shane H. W. Travis <travis@sedsystems.ca> r=jouni, mkanat a=myk
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Schema.pm49
1 files changed, 49 insertions, 0 deletions
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'},
+ ],
+ },
+
};
#--------------------------------------------------------------------------