summaryrefslogtreecommitdiff
path: root/database/updates.inc
diff options
context:
space:
mode:
Diffstat (limited to 'database/updates.inc')
-rw-r--r--database/updates.inc17
1 files changed, 16 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc
index f6c13f4c9..70e4038b1 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -118,7 +118,8 @@ $sql_updates = array(
"2005-05-11" => "update_139",
"2005-05-12" => "update_140",
"2005-05-22" => "update_141",
- "2005-07-29" => "update_142"
+ "2005-07-29" => "update_142",
+ "2005-07-30" => "update_143"
);
function update_32() {
@@ -2518,6 +2519,20 @@ function update_142() {
return $ret;
}
+function update_143() {
+ $ret = array();
+
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql("ALTER TABLE {contact} CHANGE subject category VARCHAR(255) NOT NULL ");
+ }
+ elseif ($GLOBALS['db_type'] == 'pgsql') {
+ $ret[] = update_sql("ALTER TABLE {contact} RENAME COLUMN subject TO category");
+ }
+ $ret[] = update_sql("ALTER TABLE {contact} ADD PRIMARY KEY (category)");
+
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);