Added new table called "user preferences" which can be used for

storing arbitrary preferences for each user.

Thanks to Jon Papaioannou for the first draft of this code
which I modified.
This commit is contained in:
moodler
2004-01-28 14:14:19 +00:00
parent ad7101a17b
commit 70812e39a0
7 changed files with 139 additions and 5 deletions
+11
View File
@@ -365,6 +365,17 @@ function main_upgrade($oldversion=0) {
}
if ($oldversion < 2004012800) {
modify_database("", "CREATE TABLE prefix_user_preferences (
id SERIAL PRIMARY KEY,
userid integer NOT NULL default '0',
name varchar(50) NOT NULL default '',
value varchar(255) NOT NULL default ''
); ");
modify_database("", "CREATE INDEX prefix_user_preferences_useridname_idx ON prefix_user_preferences (userid,name);");
}
return $result;
}