diff options
Diffstat (limited to 'database')
-rw-r--r-- | database/database.pgsql | 2 | ||||
-rw-r--r-- | database/updates.inc | 29 |
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; +} /** |