From: stronk7 Date: Fri, 22 Sep 2006 15:43:42 +0000 (+0000) Subject: Now cache_text->formattedtext is a longtext again. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0e1412cea5430bc63da70d33e65d7efc62d6f244;p=moodle.git Now cache_text->formattedtext is a longtext again. (both PG and the UTF8 migration script were working with it as text, so impact should be minimal) --- diff --git a/lib/db/install.xml b/lib/db/install.xml index 12bd206288..b6c4283f88 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -250,7 +250,7 @@ - + @@ -1092,4 +1092,4 @@ - \ No newline at end of file + diff --git a/lib/db/mysql.php b/lib/db/mysql.php index aa6f5e99e1..27fa0cb9e4 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -2291,6 +2291,11 @@ function main_upgrade($oldversion=0) { execute_sql("ALTER TABLE `{$CFG->prefix}context` ADD UNIQUE INDEX `contextlevel-instanceid` (`contextlevel`, `instanceid`)",false); } + if ($oldversion < 2006092201) { + execute_sql('TRUNCATE TABLE '.$CFG->prefix.'cache_text', true); + table_column('cache_text','formattedtext','formattedtext','longtext','','','','not null'); + } + return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index 112652196b..06e2102652 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -274,7 +274,7 @@ CREATE TABLE `prefix_cache_filters` ( CREATE TABLE `prefix_cache_text` ( `id` int(10) unsigned NOT NULL auto_increment, `md5key` varchar(32) NOT NULL default '', - `formattedtext` longblob NOT NULL default '', + `formattedtext` longtext NOT NULL default '', `timemodified` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `md5key` (`md5key`)