summaryrefslogtreecommitdiff
path: root/database/updates.inc
diff options
context:
space:
mode:
Diffstat (limited to 'database/updates.inc')
-rw-r--r--database/updates.inc16
1 files changed, 15 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 9489780dc..2435492c9 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -81,7 +81,8 @@ $sql_updates = array(
"2004-08-12" => "update_102",
"2004-08-17" => "update_103",
"2004-08-19" => "update_104",
- "2004-09-14" => "update_105"
+ "2004-09-14" => "update_105",
+ "2004-09-15" => "update_106"
);
function update_32() {
@@ -1798,6 +1799,19 @@ function update_105() {
return $ret;
}
+function update_106() {
+ $ret = array();
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql('ALTER TABLE {cache} ADD INDEX expire (expire)');
+ }
+ else if ($GLOBALS['db_type'] == 'pgsql') {
+ // TODO: needs PGSQL equivalent.
+ }
+
+ $ret[] = update_sql('DELETE FROM {cache}');
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);