summaryrefslogtreecommitdiff
path: root/database/updates.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-09-19 13:28:11 +0000
committerDries Buytaert <dries@buytaert.net>2004-09-19 13:28:11 +0000
commit6dbd0bcfb4c79853ca1402d9f85a325853b01411 (patch)
tree6cc1058b101a67015b722e0affb29a21b5d729d6 /database/updates.inc
parent0ca171f2a9e802c150b30390bad218208458d33a (diff)
downloadbrdo-6dbd0bcfb4c79853ca1402d9f85a325853b01411.tar.gz
brdo-6dbd0bcfb4c79853ca1402d9f85a325853b01411.tar.bz2
- Patch #6500 by Mathias with help from Steven: made it possible to add fields to the registration form. This feature used to exist.
Diffstat (limited to 'database/updates.inc')
-rw-r--r--database/updates.inc15
1 files changed, 14 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 2435492c9..a012e6095 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -82,7 +82,8 @@ $sql_updates = array(
"2004-08-17" => "update_103",
"2004-08-19" => "update_104",
"2004-09-14" => "update_105",
- "2004-09-15" => "update_106"
+ "2004-09-15" => "update_106",
+ "2004-09-17" => "update_107"
);
function update_32() {
@@ -1812,6 +1813,18 @@ function update_106() {
return $ret;
}
+function update_107() {
+ $ret = array();
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql('ALTER TABLE {profile_fields} ADD register TINYINT(1) DEFAULT 0 NOT NULL AFTER required');
+ }
+ else if ($GLOBALS['db_type'] == 'pgsql') {
+ $ret[] = update_sql('ALTER TABLE {profile_fields} ADD register smallint');
+ }
+
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);