summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-27 11:52:08 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-27 11:52:08 +0000
commit244945365da5153bdcddc2b279319c5ff88f74e6 (patch)
treec6698813be129dd4b3f27431bd0f7bec3cbb57de /database
parent8784a7d13aaa8b768a027069aab6d07cea0f3cb3 (diff)
downloadbrdo-244945365da5153bdcddc2b279319c5ff88f74e6.tar.gz
brdo-244945365da5153bdcddc2b279319c5ff88f74e6.tar.bz2
- Patch #10407 by Cvbge: fixed cache problems with PostgreSQL.
Diffstat (limited to 'database')
-rw-r--r--database/database.pgsql2
-rw-r--r--database/updates.inc29
2 files changed, 28 insertions, 3 deletions
diff --git a/database/database.pgsql b/database/database.pgsql
index c58b8c7e1..59ce317f3 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -164,7 +164,7 @@ CREATE TABLE boxes (
CREATE TABLE cache (
cid varchar(255) NOT NULL default '',
- data text default '',
+ data bytea default '',
expire integer NOT NULL default '0',
created integer NOT NULL default '0',
headers text default '',
diff --git a/database/updates.inc b/database/updates.inc
index 006a57ba2..9b10baa46 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -104,8 +104,9 @@ $sql_updates = array(
"2005-10-23" => "update_151",
"2005-10-28" => "update_152",
"2005-11-03" => "update_153",
- "2005-11-14" => "update_154"
-);
+ "2005-11-14" => "update_154",
+ "2005-11-27" => "update_155",
+); // Please leave trailing , in the last line
function update_110() {
$ret = array();
@@ -1159,6 +1160,30 @@ function update_154() {
return $ret;
}
+function update_155() {
+ $ret = array();
+
+ // Postgresql only update
+ switch ($GLOBALS['db_type']) {
+ case 'pgsql':
+ $ret[] = update_sql("DROP TABLE {cache}");
+ $ret[] = update_sql("CREATE TABLE {cache} (
+ cid varchar(255) NOT NULL default '',
+ data bytea default '',
+ expire integer NOT NULL default '0',
+ created integer NOT NULL default '0',
+ headers text default '',
+ PRIMARY KEY (cid)
+ )");
+ $ret[] = update_sql("CREATE INDEX {cache}_expire_idx ON {cache}(expire)");
+ break;
+ case 'mysql':
+ case 'mysqli':
+ break;
+ }
+
+ return $ret;
+}
/**